Hi gentlemen,
i have a problem with the floating cuda context.
Code Sample:
Thread A:
cuCtxCreate(&cuDeviceContext, CU_CTX_SCHED_AUTO, cuDeviceHandle);
cuCtxPopCurrent(NULL);
//This will be succeeded !
Thread B:
cuCtxPushCurrent(cuDeviceContext);
… allocate memory or something
cuCtxPopCurrent(NULL);
//This will be succeeded !
Thread C:
cuCtxPushCurrent(cuDeviceContext);
//at this code position the return value is CUDA_ERROR_INVALID_VALUE
Also when I try:
Thread B:
cuCtxPushCurrent(cuDeviceContext);
… allocate memory or something
cuCtxPopCurrent(NULL);
cuCtxPushCurrent(cuDeviceContext);
//at this code position the return value is CUDA_ERROR_INVALID_VALUE
Have anybody a idea what is wrong ?
Thanks and Regards
Mirek