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

CUDA 12.4 Can not find CUDA path after successful compling #577

Open
GreameLee opened this issue Aug 29, 2024 · 4 comments
Open

CUDA 12.4 Can not find CUDA path after successful compling #577

GreameLee opened this issue Aug 29, 2024 · 4 comments

Comments

@GreameLee
Copy link

I can run it before, but when I update the cuda to 12.4 it can not find the cuda path even nvcc -V can work:

KeyError                                  Traceback (most recent call last)
Cell In[1], [line 1](vscode-notebook-cell:?execution_count=1&line=1)
----> [1](vscode-notebook-cell:?execution_count=1&line=1) import tigre
      [2](vscode-notebook-cell:?execution_count=1&line=2) import numpy as np
      [3](vscode-notebook-cell:?execution_count=1&line=3) from tigre.utilities import sample_loader

File c:\Users\Haodong_Li\AppData\Local\anaconda3\envs\sde\lib\site-packages\tigre\__init__.py:18
     [15](file:///C:/Users/Haodong_Li/AppData/Local/anaconda3/envs/sde/lib/site-packages/tigre/__init__.py:15)     os.add_dll_directory(dll_directory)
     [17](file:///C:/Users/Haodong_Li/AppData/Local/anaconda3/envs/sde/lib/site-packages/tigre/__init__.py:17)     # The user must install the CUDA Toolkit
---> [18](file:///C:/Users/Haodong_Li/AppData/Local/anaconda3/envs/sde/lib/site-packages/tigre/__init__.py:18)     cuda_bin = os.path.join(os.environ["CUDA_PATH"], "bin")
     [19](file:///C:/Users/Haodong_Li/AppData/Local/anaconda3/envs/sde/lib/site-packages/tigre/__init__.py:19)     os.add_dll_directory(cuda_bin)
     [21](file:///C:/Users/Haodong_Li/AppData/Local/anaconda3/envs/sde/lib/site-packages/tigre/__init__.py:21) from .utilities.geometry import geometry

File c:\Users\Haodong_Li\AppData\Local\anaconda3\envs\sde\lib\os.py:675, in _Environ.__getitem__(self, key)
    [672](file:///C:/Users/Haodong_Li/AppData/Local/anaconda3/envs/sde/lib/os.py:672)     value = self._data[self.encodekey(key)]
    [673](file:///C:/Users/Haodong_Li/AppData/Local/anaconda3/envs/sde/lib/os.py:673) except KeyError:
    [674](file:///C:/Users/Haodong_Li/AppData/Local/anaconda3/envs/sde/lib/os.py:674)     # raise KeyError with the original key value
--> [675](file:///C:/Users/Haodong_Li/AppData/Local/anaconda3/envs/sde/lib/os.py:675)     raise KeyError(key) from None
    [676](file:///C:/Users/Haodong_Li/AppData/Local/anaconda3/envs/sde/lib/os.py:676) return self.decodevalue(value)

KeyError: 'CUDA_PATH'
  • python version:3.8
  • OS:windows
  • CUDA version:12.4
@github-staff github-staff deleted a comment from AnderBiguri Aug 29, 2024
@AnderBiguri
Copy link
Member

Hi I seem to have missed this. Something seems to have changed in CUDA 12.4 so I believe TIGRE is not compatible with it yet.

@AnderBiguri AnderBiguri changed the title Can not find CUDA path after successful compling CUDA 12.4 Can not find CUDA path after successful compling Oct 15, 2024
@tsadakane
Copy link
Contributor

Hi @AnderBiguri ,
I could not reproduce this issue in my environment. I could build the latest TIGRE from a fresh workspace and run example.py

  • Python 3.11
  • Windows 11
  • VS 2022 (Version 17.11.5)
  • CUDA 12.4.1, 12.6

The environment variable CUDA_PATH was updated by the CUDA toolkit installer.

With CUDA 11.8 and 12.2, it failed to build TIGRE with the error

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include\crt/host_config.h(164): fatal error C1189: #error:  -- unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2022 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.

I wrote I could run example.py above, but the result looks strange as attached below, which is probably a different issue.
Figure_1

@AnderBiguri
Copy link
Member

@tsadakane hum, I may have screwed up something in my fix of the Wang weigths that I did yesterday... That is the FDK error.

The error you get seems to be related to MVS, but strangely you are supposed to have a supported version... the error arises from nvcc nevertheless.
But then indeed @GreameLee maybe your issue has to do with how you installed CUDA, maybe its not added to CUDA_PATH.

@AnderBiguri
Copy link
Member

@GreameLee any update on this? have you tried having a CUDA_PATH enviroment variable?

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

4 participants
@AnderBiguri @tsadakane @GreameLee and others