Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Erro

So my guess would be fabric manager, then. You haven’t indicated much about the system this is running in, so its just a guess.

See here.