cudaDeviceScheduleBlockingSync | CPP CUDA

Given error:

cudaSetDeviceFlags(cudaDeviceScheduleBlockingSync) failed
(error: cannot set while device is active in this process)

Hi there,
Trying to run dll that utilize cuda.
Is this error means i need to use the cuda dlls from Touch ?
not sure what to do.

thanks !

It’s because TD has already setup a CUDA context, so you can’t change the settings it’s setup with.

Thanks Malcolm,
You are very right - some logic blocked the init function and caused segmentation fault .

not directly related :
Currently there is any problem to add second gpu ?
I plan to let TD use one GPU (device 0 )
while it will do the other external cuda function stuff with device (1)