Skip to content

Guard CUDA probe when CUDA_HOME is unset#2008

Open
fallintoplace wants to merge 1 commit into
NVIDIA:masterfrom
fallintoplace:fix/cuda-home-probe
Open

Guard CUDA probe when CUDA_HOME is unset#2008
fallintoplace wants to merge 1 commit into
NVIDIA:masterfrom
fallintoplace:fix/cuda-home-probe

Conversation

@fallintoplace
Copy link
Copy Markdown

Summary

  • guard the unconditional get_cuda_bare_metal_version(CUDA_HOME) call in setup.py
  • avoid touching nvcc during metadata generation or Python-only installs when CUDA_HOME is unset

Why

The repo still documents a Python-only install path, but setup.py always probes the CUDA toolkit version at import time. That makes metadata generation fail before any CUDA extension was requested.

This follows the same intent as #1499, which guarded one CUDA_HOME path earlier in setup.py, but leaves the later unconditional probe untouched. It also matches the still-open no-CUDA build report in #1498 and the metadata-generation failure reported in #1702.

Validation

  • python3 -m py_compile setup.py

@fallintoplace fallintoplace marked this pull request as ready for review May 26, 2026 23: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.

1 participant