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

mamba-ssm complaining nvcc not found while cuda is installed #665

Open
chengmarc opened this issue Jan 12, 2025 · 4 comments
Open

mamba-ssm complaining nvcc not found while cuda is installed #665

chengmarc opened this issue Jan 12, 2025 · 4 comments

Comments

@chengmarc
Copy link

Main Complaint

C:\Users\marcc\AppData\Local\Temp\pip-build-env-3vuoamb7\overlay\Lib\site-packages\torch\_subclasses\functional_tensor.py:295:  
UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\utils\tensor_numpy.cpp:84.)
        cpu = _conversion_method_template(device=torch.device("cpu"))

<string>:118: UserWarning: mamba_ssm was requested, but nvcc was not found.  Are you sure your environment has nvcc available?  If you're installing within a container from https://hub.docker.com/r/pytorch/pytorch, only images whose names contain 'devel' will provide nvcc. 

note: I am in a conda environment with the following:

python - v3.10.11 cuda - v11.8 torch - v2.5.1

I have causal-conv1d==1.4.0, NumPy is installed, too.

More Info

 Traceback (most recent call last):
        File "C:\Users\marcc\miniconda3\envs\default\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\marcc\miniconda3\envs\default\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "C:\Users\marcc\miniconda3\envs\default\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "C:\Users\marcc\AppData\Local\Temp\pip-build-env-7smda003\overlay\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
        File "C:\Users\marcc\AppData\Local\Temp\pip-build-env-7smda003\overlay\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
          self.run_setup()
        File "C:\Users\marcc\AppData\Local\Temp\pip-build-env-7smda003\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 188, in <module>
      NameError: name 'bare_metal_version' is not defined
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
@tridao
Copy link
Collaborator

tridao commented Jan 13, 2025

Is nvcc installed?

@chengmarc
Copy link
Author

C:\Users\marcc>nvcc --version

gives

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Wed_Feb__8_05:53:42_Coordinated_Universal_Time_2023
Cuda compilation tools, release 12.1, V12.1.66
Build cuda_12.1.r12.1/compiler.32415258_0

@tridao
Copy link
Collaborator

tridao commented Jan 15, 2025

Likely setup.py can't find the right path to nvcc. We rely on CUDA_HOME from torch.utils.cpp_extension
What does from torch.utils.cpp_extension import CUDA_HOME give?

@chengmarc
Copy link
Author

chengmarc commented Jan 15, 2025

>>> from torch.utils.cpp_extension import CUDA_HOME and CUDA_HOME
gives:
C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.1

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

2 participants