pyCUDA on windows is a complete mess.
It requires:
PyCUDA wiki has a simple windows installation guide step by step, for windows8, which might work Windows 10, if done correctly: HERE
___
Initially try installing pycuda; should work.
Stackoverflow link here CL (x64) path for new Visual Studio 2019 Community edition is:
nvcc fatal : Cannot find compiler 'cl.exe' in PATH
64-BIT : C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\bin\Hostx64\x64
Stackoverflow link here This was moved in Windows kit and needs to added to nvcc.profile file (include path)
Cannot find corecrt.h
Go to nvcc.profile file located at: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin
Change the include line to:
INCLUDES += "-I$(TOP)/include" "-I$(TOP)/include/cudart" "-IC:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt" $(_SPACE_)
Add it’s path to environment variable. It is located at:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin
Steps for pyopencl2019:
There are a lot of Visual Studio 14 or 2008 C++ compiler or windows.h or other files which were available natively in Visual studio or windows were moved when Microsoft decided to “re-organize” its internal libraries. So, DO NOT do directly installation of pyOpenCL from pip install
.
Instead use the method mentioned at wiki tinkere: here .
For editing siteconf.py, use the following include/lib directories:
CL_INC_DIR = ['C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.2\\include','C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\ucrt','C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um','C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\shared']
CL_LIB_DIR = ['C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.2\\lib\\x64','C:\\Program Files (x86)\\Windows Kits\\10\\Lib\\10.0.18362.0\\ucrt\\x64','C:\\Program Files (x86)\\Windows Kits\\10\\Lib\\10.0.18362.0\\um\\x64']
The answer from stackoverflow suggest to copy some files, Here , which worked for me.