neoml icon indicating copy to clipboard operation
neoml copied to clipboard

Set CUDA_ACHITECUTRE to native when undefined for NeoML/Python

Open zimka opened this issue 2 years ago • 2 comments

Whenever I try to build NeoML/Python with python setup.py install, I get the following error:

...
-- Configuring done
CMake Error in CMakeLists.txt:
  CUDA_ARCHITECTURES is empty for target "PythonWrapper".
...
CMake Generate step failed.  Build files cannot be regenerated correctly.

As far as I understand, this is because I do not specify CMAKE_CUDA_ARCHITECTURES variable. This PR sets it to native when variable is empty. Somehow works for my CMake 3.18.

zimka avatar Jul 13 '22 18:07 zimka

Wow. That's the first time I see this problem not as a CMake Warning but as an error. I will take a look at that, because I think that should be fixed somewhere in MathEngine-related cmake files.

Give me please info about you OS/CUDA ver/exact cmake ver/build command.

FedyuninV avatar Jul 14 '22 16:07 FedyuninV

Sure, please check the following info:

  1. OS OS Name: Microsoft Windows 10 Pro OS Version: 10.0.19044 N/A Build 19044

  2. CUDA > nvcc.exe --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2021 NVIDIA Corporation Built on Thu_Jan_28_19:41:49_Pacific_Standard_Time_2021 Cuda compilation tools, release 11.2, V11.2.142 Build cuda_11.2.r11.2/compiler.29558016_0 (GPU: NVIDIA GeForce RTX 2080 SUPER)

  3. > cmake.exe --version cmake version 3.20.3

  4. build (in conda 4.12.0): >cd neoml\NeoML\Python >python setup.py install (.cfg files are not used)

zimka avatar Jul 19 '22 14:07 zimka