-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcuda_info.hpp
More file actions
38 lines (26 loc) · 1.02 KB
/
cuda_info.hpp
File metadata and controls
38 lines (26 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "cuda_utils.hpp"
#include <string>
namespace tilefusion {
// Returns the number of GPUs.
int GetGPUDeviceCount();
// Returns the compute capability of the given GPU.
int GetGPUComputeCapability(int id);
// Returns the number of multiprocessors for the given GPU.
int GetGPUMultiProcessors(int id);
// Returns the maximum number of threads per multiprocessor for the given
// GPU.
int GetGPUMaxThreadsPerMultiProcessor(int id);
// Returns the maximum number of threads per block for the given GPU.
int GetGPUMaxThreadsPerBlock(int id);
// Returns the maximum grid size for the given GPU.
dim3 GetGpuMaxGridDimSize(int id);
// Returns the name of the device.
std::string GetDeviceName();
// Returns the compute capability of the current device.
std::string GetComputeCapability();
// Returns the maximum shared memory per block for the current device.
int GetMaxSharedMemoryPerBlock();
} // namespace tilefusion