diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-10-19 12:26:10 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-10-19 12:26:10 +0300 |
commit | 910dd7fb1b836792306d659305e27a9e06e238dd (patch) | |
tree | 1892372dc6cb6fa9f3a21aaac764f9cfc649571c /intern | |
parent | 7bf7b8af398b9ad3245ac52af4a8f7f91820a8eb (diff) |
Cycles: Add extra logging in CUDA device detection code
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/device/device_cuda.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp index 216c85f24e7..c245d7d8408 100644 --- a/intern/cycles/device/device_cuda.cpp +++ b/intern/cycles/device/device_cuda.cpp @@ -2115,12 +2115,17 @@ void device_cuda_info(vector<DeviceInfo>& devices) for(int num = 0; num < count; num++) { char name[256]; - if(cuDeviceGetName(name, 256, num) != CUDA_SUCCESS) + result = cuDeviceGetName(name, 256, num); + if(result != CUDA_SUCCESS) { + fprintf(stderr, "CUDA cuDeviceGetName: %s\n", cuewErrorString(result)); continue; + } int major; cuDeviceGetAttribute(&major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, num); if(major < 2) { + VLOG(1) << "Ignoring device \"" << name + << "\", compute capability is too low."; continue; } @@ -2153,6 +2158,7 @@ void device_cuda_info(vector<DeviceInfo>& devices) cuDeviceGetAttribute(&preempt_attr, CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED, num); if(timeout_attr && !preempt_attr) { + VLOG(1) << "Device is recognized as display."; info.description += " (Display)"; info.display_device = true; display_devices.push_back(info); @@ -2160,6 +2166,7 @@ void device_cuda_info(vector<DeviceInfo>& devices) else { devices.push_back(info); } + VLOG(1) << "Added device \"" << name << "\" with id \"" << info.id << "\"."; } if(!display_devices.empty()) |