Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mours <pmours@nvidia.com>2021-10-29 11:29:25 +0300
committerJeroen Bakker <jeroen@blender.org>2021-10-29 11:29:25 +0300
commitb382632665b3552d580a3c65e94dd36857d5fb68 (patch)
treeda708d02afef36f62dc0342fd9506d1e19e53709
parent90ee4b94eeadde473d570d849bac0b9e2156c4d9 (diff)
Add missing "CUDA_ERROR_UNSUPPORTED_PTX_VERSION" to CUEW
This is required for Cycles to report a meaningful error message when it fails to load a PTX module created with a newer CUDA toolkit version than the driver supports. Ref T91879
-rw-r--r--extern/cuew/include/cuew.h1
-rw-r--r--extern/cuew/src/cuew.c1
-rw-r--r--intern/cycles/device/cuda/device_cuda_impl.cpp4
3 files changed, 4 insertions, 2 deletions
diff --git a/extern/cuew/include/cuew.h b/extern/cuew/include/cuew.h
index 0fa0f1291fa..85522744ad1 100644
--- a/extern/cuew/include/cuew.h
+++ b/extern/cuew/include/cuew.h
@@ -609,6 +609,7 @@ typedef enum cudaError_enum {
CUDA_ERROR_INVALID_GRAPHICS_CONTEXT = 219,
CUDA_ERROR_NVLINK_UNCORRECTABLE = 220,
CUDA_ERROR_JIT_COMPILER_NOT_FOUND = 221,
+ CUDA_ERROR_UNSUPPORTED_PTX_VERSION = 222,
CUDA_ERROR_INVALID_SOURCE = 300,
CUDA_ERROR_FILE_NOT_FOUND = 301,
CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND = 302,
diff --git a/extern/cuew/src/cuew.c b/extern/cuew/src/cuew.c
index f477ec48a18..e5349763197 100644
--- a/extern/cuew/src/cuew.c
+++ b/extern/cuew/src/cuew.c
@@ -736,6 +736,7 @@ const char *cuewErrorString(CUresult result) {
case CUDA_ERROR_INVALID_GRAPHICS_CONTEXT: return "Invalid graphics context";
case CUDA_ERROR_NVLINK_UNCORRECTABLE: return "Nvlink uncorrectable";
case CUDA_ERROR_JIT_COMPILER_NOT_FOUND: return "Jit compiler not found";
+ case CUDA_ERROR_UNSUPPORTED_PTX_VERSION: return "Unsupported PTX version";
case CUDA_ERROR_INVALID_SOURCE: return "Invalid source";
case CUDA_ERROR_FILE_NOT_FOUND: return "File not found";
case CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND: return "Link to a shared object failed to resolve";
diff --git a/intern/cycles/device/cuda/device_cuda_impl.cpp b/intern/cycles/device/cuda/device_cuda_impl.cpp
index 6196f642f8e..22a136e5ab9 100644
--- a/intern/cycles/device/cuda/device_cuda_impl.cpp
+++ b/intern/cycles/device/cuda/device_cuda_impl.cpp
@@ -545,9 +545,9 @@ bool CUDADevice::load_kernels(const DeviceRequestedFeatures &requested_features)
if (result == CUDA_SUCCESS) {
reserve_local_memory(requested_features);
- }
- load_functions();
+ load_functions();
+ }
return (result == CUDA_SUCCESS);
}