I am trying to execute the code here. I get the following error:
orig: [0.36975162 0.08511397 0.16306844 0.4015488 0.25104857 0.30606773 0.24524205 0.13792656]
Process Process-1:
Traceback (most recent call last):
File "C:\Program Files\Python27\lib\multiprocessing\process.py", line 267, in _bootstrap
self.run()
File "C:\Program Files\Python27\lib\multiprocessing\process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\My\Desktop\test_codes\pycuda4.py", line 28, in func1
h = drv.mem_get_ipc_handle(x_gpu.ptr)
LogicError: cuIpcGetMemHandle failed: operation not supported
I am using Python 3.7, CUDA 9.2 in Windows 7 x64 environment. Is CUDA IPCMemoryHandle
not supported in Windows? Or, am I missing something?
What is documented here is that CUDA IPC functionality is only supported on Linux.
However, the driver API (upon which PyCUDA is based) docs indicate:
IPC functionality is restricted to devices with support for unified addressing on Linux and Windows operating systems. IPC functionality on Windows is restricted to GPUs in TCC mode
Therefore if you can put your windows GPU in TCC mode (via nvidia-smi
tool) then I think it should probably work/be supported. GeForce GPUs cannot be put in TCC mode. Most Titan and Quadro GPUs can be placed in TCC mode. Most Tesla GPUs on windows should automatically be in TCC mode. Note that putting your GPU in TCC mode means it cannot host a display any longer.
In recent CUDA toolkits, IPC support has been added for both WDDM and TCC usage in windows (the underlying mechanisms are different). The CUDA IPC sample code demonstrates all flavors (linux, windows TCC, windows WDDM).