small change for recent CUDA compatibility
This commit is contained in:
parent
d4085f49a5
commit
222f6db431
|
|
@ -177,7 +177,8 @@ static void initialize_cuda(cuda_data_t *cd)
|
||||||
//
|
//
|
||||||
// create a context
|
// create a context
|
||||||
//
|
//
|
||||||
CU_CALL( cuCtxCreate , (&cd->cu_context,CU_CTX_SCHED_YIELD,cd->cu_device) );
|
CU_CALL( cuDevicePrimaryCtxRetain , (&cd->cu_context,cd->cu_device) );
|
||||||
|
CU_CALL( cuCtxSetCurrent , (cd->cu_context) );
|
||||||
CU_CALL( cuCtxSetCacheConfig , (CU_FUNC_CACHE_PREFER_L1) );
|
CU_CALL( cuCtxSetCacheConfig , (CU_FUNC_CACHE_PREFER_L1) );
|
||||||
//
|
//
|
||||||
// load precompiled modules
|
// load precompiled modules
|
||||||
|
|
@ -223,7 +224,7 @@ static void terminate_cuda(cuda_data_t *cd)
|
||||||
CU_CALL( cuMemFree , (cd->device_data[i]) );
|
CU_CALL( cuMemFree , (cd->device_data[i]) );
|
||||||
}
|
}
|
||||||
CU_CALL( cuModuleUnload , (cd->cu_module) );
|
CU_CALL( cuModuleUnload , (cd->cu_module) );
|
||||||
CU_CALL( cuCtxDestroy , (cd->cu_context) );
|
CU_CALL( cuDevicePrimaryCtxRelease, (cd->cu_device) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue