Skip to content

Conversation

Qubitium
Copy link
Collaborator

@Qubitium Qubitium commented Aug 24, 2025

Try to fix #1729

Signed-off-by: Qubitium <Qubitium@modelcloud.ai>
Signed-off-by: Qubitium <Qubitium@modelcloud.ai>
Signed-off-by: Qubitium <Qubitium@modelcloud.ai>
@jiqing-feng
Copy link
Collaborator

Got this error when pip install -e . on XPU

Obtaining file:///home/sdp/jiqing/GPTQModel
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 35, in <module>
        File "/home/sdp/jiqing/GPTQModel/setup.py", line 356, in <module>
          cpp_ext.CUDAExtension(
        File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 1337, in CUDAExtension
          library_dirs += library_paths(device_type="cuda")
        File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 1548, in library_paths
          if (not os.path.exists(_join_cuda_home(lib_dir)) and
        File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 2982, in _join_cuda_home
          raise OSError('CUDA_HOME environment variable is not set. '
      OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

@Qubitium
Copy link
Collaborator Author

Still buggy. We need to disable all nvcc/rocm kernel cpp_extension compliation when cuda is not found (xpu/cpu env).

Qubitium and others added 4 commits August 25, 2025 10:03
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

Successfully merging this pull request may close these issues.

3 participants