Skip to content

[Bug] python 3.13 cuda 12.9 torch 2.8 Compilation failed #747

Description

@wzgrx

Checklist

Describe the Bug

Compilation failed

Environment

window11 4090 24gb python3.13 cuda12.9

pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu129

Build fails on Windows: pybind.cpp missing in nunchaku/csrc/, likely due to uninitialized submodules

Reproduction Steps

The project appears to rely on Git submodules for C++/CUDA source code and third-party dependencies, but these submodules are not initialized in a fresh clone (or ZIP download). Users who download the source via GitHub’s “Download ZIP” button will encounter this issue because ZIP archives do not include submodule contents.

✅ Expected Behavior
The build should succeed after following standard installation instructions, or the README should clearly state that submodules must be initialized.

🖥️ Environment
OS: Windows 11
Python: 3.13
PyTorch: 2.4+ (compiled with CUDA 12.9)
NVCC: 12.9.41
CUDA: 12.9
Command used: python setup.py develop (also fails with pip install -e .)
📝 Suggested Fix
Update README.md to include explicit instructions:
BASH
git clone --recursive https://github.com//nunchaku.git
cd nunchaku
git submodule update --init --recursive # if not using --recursive above
pip install -v -e .
(Optional) Add a pre-build check in setup.py that verifies the existence of nunchaku/csrc/pybind.cpp and prints a helpful error message if missing, e.g.:
PYTHON
if not os.path.exists("nunchaku/csrc/pybind.cpp"):
raise RuntimeError(
"C++ source files not found. Did you forget to initialize submodules?\n"
"Run: git submodule update --init --recursive"
)
💡 Workaround
Manually initialize submodules:

BASH
git submodule update --init --recursive
Then rebuild.

After asking AI, retesting still fails to compile

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions