Skip to content

Fix metadata-only setup commands for PyTorch bindings#534

Open
ayushozha wants to merge 1 commit into
NVlabs:masterfrom
ayushozha:ayush/fix-setup-metadata-detection
Open

Fix metadata-only setup commands for PyTorch bindings#534
ayushozha wants to merge 1 commit into
NVlabs:masterfrom
ayushozha:ayush/fix-setup-metadata-detection

Conversation

@ayushozha

Copy link
Copy Markdown
Contributor

Summary

  • skip GPU architecture detection for metadata-only setup.py commands such as egg_info
  • replace the deprecated pkg_resources version parsing import with packaging.version.parse
  • document TCNN_CUDA_ARCHITECTURES for headless or CPU-only PyTorch install environments

Why

Issue #503 fails during metadata generation before the extension build even starts. That prevents pip from reaching the point where users can provide TCNN_CUDA_ARCHITECTURES explicitly on shared or headless systems.

This change keeps metadata-only commands lightweight, preserves the existing build-time requirement for a known compute capability, and updates the setup script to work in a current setuptools environment where pkg_resources is no longer available.

Validation

  • python -m py_compile bindings/torch/setup.py
  • python setup.py egg_info
  • python setup.py --name
  • python setup.py build_ext now fails fast with a clear TCNN_CUDA_ARCHITECTURES message instead of failing during metadata generation

Closes #503.

@ayushozha ayushozha marked this pull request as ready for review March 27, 2026 11:40
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.

tinycuda installation fails

1 participant