remove support for CUDA toolkits before version 8 and GPUs older than Kepler
This commit is contained in:
@ -320,6 +320,9 @@ class UCL_Device {
|
||||
|
||||
// Grabs the properties for all devices
|
||||
UCL_Device::UCL_Device() {
|
||||
#if CUDA_VERSION < 8000
|
||||
#error CUDA Toolkit version 8 or later required
|
||||
#endif
|
||||
CU_SAFE_CALL_NS(cuInit(0));
|
||||
CU_SAFE_CALL_NS(cuDeviceGetCount(&_num_devices));
|
||||
for (int i=0; i<_num_devices; ++i) {
|
||||
@ -358,16 +361,12 @@ UCL_Device::UCL_Device() {
|
||||
CU_SAFE_CALL_NS(cuDeviceGetAttribute(&prop.clockRate, CU_DEVICE_ATTRIBUTE_CLOCK_RATE, dev));
|
||||
CU_SAFE_CALL_NS(cuDeviceGetAttribute(&prop.textureAlign, CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, dev));
|
||||
|
||||
#if CUDA_VERSION >= 2020
|
||||
CU_SAFE_CALL_NS(cuDeviceGetAttribute(&prop.kernelExecTimeoutEnabled, CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT,dev));
|
||||
CU_SAFE_CALL_NS(cuDeviceGetAttribute(&prop.integrated, CU_DEVICE_ATTRIBUTE_INTEGRATED, dev));
|
||||
CU_SAFE_CALL_NS(cuDeviceGetAttribute(&prop.canMapHostMemory, CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY, dev));
|
||||
CU_SAFE_CALL_NS(cuDeviceGetAttribute(&prop.computeMode, CU_DEVICE_ATTRIBUTE_COMPUTE_MODE,dev));
|
||||
#endif
|
||||
#if CUDA_VERSION >= 3010
|
||||
CU_SAFE_CALL_NS(cuDeviceGetAttribute(&prop.concurrentKernels, CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS, dev));
|
||||
CU_SAFE_CALL_NS(cuDeviceGetAttribute(&prop.ECCEnabled, CU_DEVICE_ATTRIBUTE_ECC_ENABLED, dev));
|
||||
#endif
|
||||
|
||||
_properties.push_back(prop);
|
||||
}
|
||||
@ -415,13 +414,10 @@ void UCL_Device::clear() {
|
||||
|
||||
// List all devices along with all properties
|
||||
void UCL_Device::print_all(std::ostream &out) {
|
||||
#if CUDA_VERSION >= 2020
|
||||
int driver_version;
|
||||
cuDriverGetVersion(&driver_version);
|
||||
out << "CUDA Driver Version: "
|
||||
<< driver_version/1000 << "." << driver_version%100
|
||||
<< std::endl;
|
||||
#endif
|
||||
<< driver_version/1000 << "." << driver_version%100 << std::endl;
|
||||
|
||||
if (num_devices() == 0)
|
||||
out << "There is no device supporting CUDA\n";
|
||||
@ -438,12 +434,10 @@ void UCL_Device::print_all(std::ostream &out) {
|
||||
out << "No\n";
|
||||
out << " Total amount of global memory: "
|
||||
<< gigabytes(i) << " GB\n";
|
||||
#if CUDA_VERSION >= 2000
|
||||
out << " Number of compute units/multiprocessors: "
|
||||
<< _properties[i].multiProcessorCount << std::endl;
|
||||
out << " Number of cores: "
|
||||
<< cores(i) << std::endl;
|
||||
#endif
|
||||
out << " Total amount of constant memory: "
|
||||
<< _properties[i].totalConstantMemory << " bytes\n";
|
||||
out << " Total amount of local/shared memory per block: "
|
||||
@ -468,7 +462,6 @@ void UCL_Device::print_all(std::ostream &out) {
|
||||
<< _properties[i].textureAlign << " bytes\n";
|
||||
out << " Clock rate: "
|
||||
<< clock_rate(i) << " GHz\n";
|
||||
#if CUDA_VERSION >= 2020
|
||||
out << " Run time limit on kernels: ";
|
||||
if (_properties[i].kernelExecTimeoutEnabled)
|
||||
out << "Yes\n";
|
||||
@ -487,22 +480,14 @@ void UCL_Device::print_all(std::ostream &out) {
|
||||
out << " Compute mode: ";
|
||||
if (_properties[i].computeMode == CU_COMPUTEMODE_DEFAULT)
|
||||
out << "Default\n"; // multiple threads can use device
|
||||
#if CUDA_VERSION >= 8000
|
||||
else if (_properties[i].computeMode == CU_COMPUTEMODE_EXCLUSIVE_PROCESS)
|
||||
#else
|
||||
else if (_properties[i].computeMode == CU_COMPUTEMODE_EXCLUSIVE)
|
||||
#endif
|
||||
out << "Exclusive\n"; // only thread can use device
|
||||
else if (_properties[i].computeMode == CU_COMPUTEMODE_PROHIBITED)
|
||||
out << "Prohibited\n"; // no thread can use device
|
||||
#if CUDART_VERSION >= 4000
|
||||
else if (_properties[i].computeMode == CU_COMPUTEMODE_EXCLUSIVE_PROCESS)
|
||||
out << "Exclusive Process\n"; // multiple threads 1 process
|
||||
#endif
|
||||
else
|
||||
out << "Unknown\n";
|
||||
#endif
|
||||
#if CUDA_VERSION >= 3010
|
||||
out << " Concurrent kernel execution: ";
|
||||
if (_properties[i].concurrentKernels)
|
||||
out << "Yes\n";
|
||||
@ -513,7 +498,6 @@ void UCL_Device::print_all(std::ostream &out) {
|
||||
out << "Yes\n";
|
||||
else
|
||||
out << "No\n";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user