Commit 820acd5f authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed error using CUDA 8.0 toolkit with 9.0 driver

parent 4810bac7
...@@ -257,7 +257,7 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking ...@@ -257,7 +257,7 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
int multiprocessors; int multiprocessors;
CHECK_RESULT(cuDeviceGetAttribute(&multiprocessors, CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, device)); CHECK_RESULT(cuDeviceGetAttribute(&multiprocessors, CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, device));
numThreadBlocks = numThreadBlocksPerComputeUnit*multiprocessors; numThreadBlocks = numThreadBlocksPerComputeUnit*multiprocessors;
if (cudaDriverVersion >= 9000) { if (computeCapability >= 7.0) {
compilationDefines["SYNC_WARPS"] = "__syncwarp();"; compilationDefines["SYNC_WARPS"] = "__syncwarp();";
compilationDefines["SHFL(var, srcLane)"] = "__shfl_sync(0xffffffff, var, srcLane);"; compilationDefines["SHFL(var, srcLane)"] = "__shfl_sync(0xffffffff, var, srcLane);";
compilationDefines["BALLOT(var)"] = "__ballot_sync(0xffffffff, var);"; compilationDefines["BALLOT(var)"] = "__ballot_sync(0xffffffff, var);";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment