Cycles:
* Add back option to bundle CUDA kernel binaries with builds. * Disable runtime CUDA kernel compilation on Windows, couldn't get this working, since it seems to depend on visual studio being installed, even though for this particular case it shouldn't be needed. CMake only at the moment. * Runtime compilation on linux/mac should now work if nvcc is not installed in the default location, but available in PATH.
This commit is contained in:
@@ -373,8 +373,14 @@ bool cuLibraryInit()
|
||||
/* cuda 4.0 */
|
||||
CUDA_LIBRARY_FIND(cuCtxSetCurrent);
|
||||
|
||||
#ifndef WITH_CUDA_BINARIES
|
||||
#ifdef _WIN32
|
||||
return false; /* runtime build doesn't work at the moment */
|
||||
#else
|
||||
if(cuCompilerPath() == "")
|
||||
return false;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* success */
|
||||
result = true;
|
||||
@@ -401,7 +407,15 @@ string cuCompilerPath()
|
||||
else
|
||||
nvcc = path_join(defaultpath, executable);
|
||||
|
||||
return (path_exists(nvcc))? nvcc: "";
|
||||
if(path_exists(nvcc))
|
||||
return nvcc;
|
||||
|
||||
#ifndef _WIN32
|
||||
if(system("which nvcc") == 0)
|
||||
return "nvcc";
|
||||
#endif
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
Reference in New Issue
Block a user