Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building issues [no CUDA toolset found] #103

Closed
ph57fe opened this issue Apr 22, 2020 · 22 comments
Closed

Building issues [no CUDA toolset found] #103

ph57fe opened this issue Apr 22, 2020 · 22 comments

Comments

@ph57fe
Copy link

ph57fe commented Apr 22, 2020

I have building issues with the following system settings:

Windows 10
Visual Studio 2019 (Community Edition) Version 16.5.4
cmake 3.17.1
python 3.7
CUDA 10.1

Even though CUDA is installed, but cmake is not able to locate it. The VCTargets is not created in the VC folder:
C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/VC/

Ankit@DESKTOP-KVF0V7L MINGW64 ~/localgitrepository/mitsuba2 (master)
$ cmake -G "Visual Studio 16 2019" -A x64
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
-- The C compiler identification is MSVC 19.25.28614.0
-- The CXX compiler identification is MSVC 19.25.28614.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python37_64/python.exe (found version "3.7.5")
-- Found PythonLibs: C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python37_64/libs/Python37.lib
-- Building the following variants of Mitsuba:
--  * scalar_rgb
--  * scalar_spectral
--  * gpu_rgb
--  * gpu_autodiff_rgb
-- Mitsuba: building the Python plugin.
CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeDetermineCompilerId.cmake:367 (message):
  No CUDA toolset found.
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeDetermineCUDACompiler.cmake:72 (CMAKE_DETERMINE_COMPILER_ID)
  ext/enoki/CMakeLists.txt:20 (enable_language)

-- Configuring incomplete, errors occurred!
See also "C:/Users/Ankit/localgitrepository/mitsuba2/CMakeFiles/CMakeOutput.log".

Do you have an idea? Thanks!

@Speierers
Copy link
Member

Hi,

is nvcc in your PATH?

E.g. if you try to run:

nvcc --version

@ph57fe
Copy link
Author

ph57fe commented Apr 23, 2020

This is what I get with nvcc --version :

Ankit@DESKTOP-KVF0V7L MINGW64 ~/localgitrepository3/mitsuba2 (master)
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Fri_Feb__8_19:08:26_Pacific_Standard_Time_2019
Cuda compilation tools, release 10.1, V10.1.105

Got the issue solved by manually copying the files from C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\visual_studio_integration\MSBuildExtensions to C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations.

@Speierers
Copy link
Member

Looking at the environment variables in my system. Do you have something similar?

image

image

@ph57fe
Copy link
Author

ph57fe commented Apr 23, 2020

Yes, I have these.

1

2

@Speierers
Copy link
Member

Could you try to pull latest master and update the submodule. We fixed something in enoki recently which might be related to this.

git pull --rebase origin master
git submodule update --recursive

@hjoonpark
Copy link

hjoonpark commented Apr 25, 2020

Is my problem similar to this?
I get this CMAKE configure error:

CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.

-- Building the following variants of Mitsuba:
-- * scalar_rgb
-- * gpu_autodiff_rgb
-- Mitsuba: building the Python plugin.
CMake Error at C:/Users/hjoon/Documents/cmake-3.16.0-win64-x64/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:351 (message):
No CUDA toolset found.
Call Stack (most recent call first):
C:/Users/hjoon/Documents/cmake-3.16.0-win64-x64/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
C:/Users/hjoon/Documents/cmake-3.16.0-win64-x64/share/cmake-3.16/Modules/CMakeDetermineCUDACompiler.cmake:72 (CMAKE_DETERMINE_COMPILER_ID)
ext/enoki/CMakeLists.txt:28 (enable_language)

-- Configuring incomplete, errors occurred!

Here are what I've done so far.
I pulled the latest master using:

git pull --rebase origin master
git submodule update --recursive

I checked nvcc is installed:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:12:52_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.1, V10.1.243

and I set the environment variables:

CMAKE_CUDA_COMPILER = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc
CUDA_PATH = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
CUDA_PATH_V10_1 = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1

I also followed this:

Got the issue solved by manually copying the files from C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\visual_studio_integration\MSBuildExtensions to C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations.

but still not resolved..

@Speierers
Copy link
Member

Would you be able to update CUDA on your system? (e.g. v10.2)

Not sure this would solve your problem, but it is worth a try!

@ph57fe
Copy link
Author

ph57fe commented Apr 28, 2020

Hi @Speierers

Thanks, I got all the previous issues resolved by updating to CUDA 10.2. I'm facing now facing an error when integrating with PyTorch.

I have the following:
Python 3.7.6
Pytorch 1.5.0
conda 4.8.0
cudatoolkit 10.2.89
torchvision 0.6.0

I am facing the following error.

Traceback (most recent call last):
  File "C:/Users/Ankit/localgitrepository/mitsuba2/dist/scene_render.py", line 13, in <module>
    import torch
  File "C:\Users\Ankit\Anaconda3\lib\site-packages\torch\__init__.py", line 81, in <module>
    ctypes.CDLL(dll)
  File "C:\Users\Ankit\Anaconda3\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 127] The specified procedure could not be found

Do you have an idea? Thanks!

@Speierers
Copy link
Member

Speierers commented Apr 29, 2020

This seems to be related to Pytorch and not Mitsuba:
See this: pytorch/pytorch#37209

@KnightYao
Copy link

mark

@Theo-Wu
Copy link

Theo-Wu commented Jul 21, 2021

Is my problem similar to this?
I get this CMAKE configure error:

CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
-- Building the following variants of Mitsuba:
-- * scalar_rgb
-- * gpu_autodiff_rgb
-- Mitsuba: building the Python plugin.
CMake Error at C:/Users/hjoon/Documents/cmake-3.16.0-win64-x64/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:351 (message):
No CUDA toolset found.
Call Stack (most recent call first):
C:/Users/hjoon/Documents/cmake-3.16.0-win64-x64/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
C:/Users/hjoon/Documents/cmake-3.16.0-win64-x64/share/cmake-3.16/Modules/CMakeDetermineCUDACompiler.cmake:72 (CMAKE_DETERMINE_COMPILER_ID)
ext/enoki/CMakeLists.txt:28 (enable_language)
-- Configuring incomplete, errors occurred!

Here are what I've done so far.
I pulled the latest master using:

git pull --rebase origin master
git submodule update --recursive

I checked nvcc is installed:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:12:52_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.1, V10.1.243

and I set the environment variables:

CMAKE_CUDA_COMPILER = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc
CUDA_PATH = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
CUDA_PATH_V10_1 = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1

I also followed this:

Got the issue solved by manually copying the files from C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\visual_studio_integration\MSBuildExtensions to C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations.

but still not resolved..

I am using CUDA 10.2 but get the same problem too. Can you help me with this?

Solved by reinstalling CUDA 10.2. Then deleted CmakeFiles folder and CmakeCache.txt, and built successfully.

@Chenguoz
Copy link

60\BuildCustomizations。

Thanks, I tossed and turned all day until I saw your reply and I solved the problem!

@giodude12
Copy link

Hey, i'm still getting the issue. My path seems right and i have the files manually copied into visua studio. Does anybody have a fix?

image

@SHPEYOLO
Copy link

Hey, i'm getting the issue.

nvcc fatal : Could not set up the environment for Microsoft Visual Studio using 'D:/VS2019/Community/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/../../../
../../../../VC/Auxiliary/Build/vcvars64.bat'
D:\VS2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.6.targets(879,9): error MSB3721: 命令“"G:\CUDA_manger\CUDA11.6\CUDA2\bin\nvcc.exe" -
dlink -o ngp.dir\RelWithDebInfo\ngp.device-link.obj -Xcompiler "/EHsc /W1 /nologo /O2 /FdF:\Tutorial\ngp\instant-ngp\build\RelWithDebInfo\ngp.pdb /Zi /MD /
GR" -LG:\CUDA_manger\CUDA11.6\CUDA2\bin/crt -LG:\CUDA_manger\CUDA11.6\CUDA2\lib\x64 opengl32.lib dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\conte
xt.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\init.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\input.obj dependencies\glfw\src
glfw_objects.dir\RelWithDebInfo\monitor.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\vulkan.obj dependencies\glfw\src\glfw_objects.dir\RelWithD
ebInfo\window.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\win32_init.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\win32_joystick.
obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\win32_monitor.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\win32_time.obj dependencie
s\glfw\src\glfw_objects.dir\RelWithDebInfo\win32_thread.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\win32_window.obj dependencies\glfw\src\glf
w_objects.dir\RelWithDebInfo\wgl_context.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\egl_context.obj dependencies\glfw\src\glfw_objects.dir\Re
lWithDebInfo\osmesa_context.obj dependencies\glfw\src\glfw_objects.dir\RelWithDebInfo\glfw.res "dependencies\tiny-cuda-nn\src\RelWithDebInfo\tiny-cuda-nn.li
b" cuda.lib cublas.lib cudadevrt.lib cudart_static.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut
32.lib uuid.lib odbc32.lib odbccp32.lib cudart.lib -forward-unknown-to-host-compiler -Wno-deprecated-gpu-targets -gencode=arch=compute_86,code=compute_86 -
gencode=arch=compute_86,code=sm_86 --machine 64 ngp.dir\RelWithDebInfo\camera_path.obj ngp.dir\RelWithDebInfo\common_device.obj ngp.dir\RelWithDebInfo\marc
hing_cubes.obj ngp.dir\RelWithDebInfo\nerf_loader.obj ngp.dir\RelWithDebInfo\render_buffer.obj ngp.dir\RelWithDebInfo\testbed.obj ngp.dir\RelWithDebInfo\tes
tbed_image.obj ngp.dir\RelWithDebInfo\testbed_nerf.obj ngp.dir\RelWithDebInfo\testbed_sdf.obj ngp.dir\RelWithDebInfo\testbed_volume.obj ngp.dir\RelWithDebIn
fo\tinyexr_wrapper.obj ngp.dir\RelWithDebInfo\triangle_bvh.obj”已退出,返回代码为 1。 [F:\Tutorial\ngp\instant-ngp\build\ngp.vcxproj]

@merlinND
Copy link
Member

Hi @SHPEYOLO,

Your error log seems to refer to instant-ngp rather than Mitsuba, did you post in the right repo?

@Shy-fawn
Copy link

您好!!!!這是我以下碰到的問題:
我需要在命令提示字元輸入:
cmake . -B build
cmake --build build --config RelWithDebInfo -j 16

但是一直顯示這樣的錯誤:
D:\Tutorial\ngp\instant-ngp>cmake . -B build
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000.
-- Automatic GPU detection failed. Building for common architectures.
-- Targeting GPU architectures: 53;60;61;70;75;80;86
CMake Warning at dependencies/tiny-cuda-nn/CMakeLists.txt:140 (message):
Fully fused MLPs do not support GPU architectures of 70 or less. Falling
back to CUTLASS MLPs. Remove GPU architectures 70 and lower to allow
maximum performance

CMake Error at dependencies/tiny-cuda-nn/CMakeLists.txt:188 (add_subdirectory):
The source directory

D:/Tutorial/ngp/instant-ngp/dependencies/tiny-cuda-nn/dependencies/fmt

does not contain a CMakeLists.txt file.

-- Could NOT find Vulkan (missing: Vulkan_LIBRARY Vulkan_INCLUDE_DIR) (found version "")
CMake Warning at CMakeLists.txt:118 (message):
Vulkan was not found. Neural graphics primitives will still compile and
run correctly, but DLSS will not be supported.

-- Using Win32 for window creation
-- OptiX_INSTALL_DIR value: C:\ProgramData\NVIDIA Corporation\OptiX SDK 7.6.0
-- pybind11 v2.7.1
-- Configuring incomplete, errors occurred!
See also "D:/Tutorial/ngp/instant-ngp/build/CMakeFiles/CMakeOutput.log".
See also "D:/Tutorial/ngp/instant-ngp/build/CMakeFiles/CMakeError.log".

D:\Tutorial\ngp\instant-ngp>cmake --build build --config RelWithDebInfo -j 16
Microsoft (R) Build Engine for .NET Framework 16.11.2+f32259642 版
Copyright (C) Microsoft Corporation. 著作權所有,並保留一切權利。

MSBUILD : error MSB1009: 專案檔不存在。
參數: ALL_BUILD.vcxproj

請問我是有什麼沒安裝好,還是此步驟其實是可以忽略的?

@merlinND
Copy link
Member

Hello @Shy-fawn,

Same as above: your error log seems to refer to instant-ngp rather than Mitsuba, did you post in the right repo?

@Shy-fawn
Copy link

@merlinND 不好意思再打擾您
請問您是指這部分嗎?
請問可以查看到我付上的圖片嗎?
r2
r3
r1

@wjakob
Copy link
Member

wjakob commented Nov 14, 2022

@Shy-fawn 您在錯誤的存儲庫上發布。 請用英文發帖,否則我們很遺憾需要封鎖您的帳戶。

@zeynepiskenderoglu
Copy link

'cmake' is not recognized as an internal or external command, operable program or batch file. i am having the problem.
Got the issue solved by manually copying the files from C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\visual_studio_integration\MSBuildExtensions to C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\ MSBuild\Microsoft\VC\v160\BuildCustomizations
I am trying to implement the process, but there is no such path on my computer; C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations
instead there are these
image
what should I do?

@wjakob
Copy link
Member

wjakob commented Jan 4, 2023

@zeynepiskenderoglu -- please use Mitsuba 3, this project is no longer supported.

@aakash-chaddha
Copy link

If still facing the issue on windows:

Make sure cmake is path is in windows global env-variables.
Steps:

  1. Search "Developer Command Prompt" in all-apps, I get this "Developer Command Prompt for VS 2019"
  2. Now type "where cmake" copy the path i.e "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin"
  3. Append it in Path in System Variables
  4. Make sure to remove "build" folder from your working dir where cmake build command failed.
  5. run cmake build command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests