From a5052770b85fefe00511886429e6fc1f5056e1e8 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Sat, 3 Feb 2018 10:59:09 -0700 Subject: cycles: Add an nvrtc based cubin cli compiler. nvcc is very picky regarding compiler versions, severely limiting the compiler we can use, this commit adds a nvrtc based compiler that'll allow us to build the cubins even if the host compiler is unsupported. for details see D2913. Differential Revision: http://developer.blender.org/D2913 --- extern/cuew/src/cuew.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'extern/cuew/src/cuew.c') diff --git a/extern/cuew/src/cuew.c b/extern/cuew/src/cuew.c index 962059bfcce..b68dc597049 100644 --- a/extern/cuew/src/cuew.c +++ b/extern/cuew/src/cuew.c @@ -329,7 +329,7 @@ int cuewInit(void) { #ifdef _WIN32 /* Expected in c:/windows/system or similar, no path needed. */ const char *cuda_paths[] = {"nvcuda.dll", NULL}; - const char *nvrtc_paths[] = {"nvrtc.dll", NULL}; + const char *nvrtc_paths[] = {"nvrtc64_80.dll", "nvrtc64_90.dll", "nvrtc64_91.dll", NULL}; #elif defined(__APPLE__) /* Default installation path. */ const char *cuda_paths[] = {"/usr/local/cuda/lib/libcuda.dylib", NULL}; @@ -766,6 +766,15 @@ const char *cuewCompilerPath(void) { return NULL; } +int cuewNvrtcVersion(void) { + int major, minor; + if (nvrtcVersion) { + nvrtcVersion(&major, &minor); + return 10 * major + minor; + } + return 0; +} + int cuewCompilerVersion(void) { const char *path = cuewCompilerPath(); const char *marker = "Cuda compilation tools, release "; -- cgit v1.2.3