[CuTeDSL] Fix prep_editable_install.py for split nvidia-cutlass-dsl wheels - #3417
Open
zkyue wants to merge 1 commit into
Open
[CuTeDSL] Fix prep_editable_install.py for split nvidia-cutlass-dsl wheels#3417zkyue wants to merge 1 commit into
zkyue wants to merge 1 commit into
Conversation
…heels
Since 4.4.0 the nvidia-cutlass-dsl wheel on PyPI is a metadata-only shim;
the runtime libraries and python packages (cutlass/_mlir in particular)
moved to per-platform nvidia-cutlass-dsl-libs-{base,core,cu12,cu13} wheels
referenced via Requires-Dist, under dsl_packages/ instead of
python_packages/. prep_editable_install.py still downloaded only the
top-level wheel with --no-deps and extracted nothing, then reported
success, leaving editable installs failing at import time with
ModuleNotFoundError: No module named 'cutlass._mlir'.
Detect the metadata-only shim by inspecting its contents and follow its
Requires-Dist entries within the nvidia-cutlass-dsl-libs-* family
transitively, keeping only the requested CUDA variant among the cuNN
wheels (--cu12 default, --cu13 to match setup.sh); merge every bundled
cutlass payload directory found under python_packages/ or dsl_packages/
instead of only the first; raise a clear error instead of succeeding
when no runtime library or cutlass python payload was extracted.
Pre-split wheels (<= 4.3.x) carry their payload in the top-level wheel
and are handled exactly as before.
Signed-off-by: zky <51477259+zkyue@users.noreply.github.com>
This was referenced Jul 29, 2026
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3416.
Symptom
The CuTeDSL editable dev flow (
python/CuTeDSL/prep_editable_install.py, thensetup.sh --editable) produces an install that fails atimport cutlasswithModuleNotFoundError: No module named 'cutlass._mlir'. The prep script prints "Setup completed successfully!" while its summary shows0 lib files, 0 Python files copied.Root cause
Since 4.4.0 the
nvidia-cutlass-dslwheel on PyPI is a ~10 KB metadata-only shim; the runtime libraries and python payload moved tonvidia-cutlass-dsl-libs-{base,core,cu12,cu13}wheels (declared viaRequires-Dist, cu13 behind thecu13extra), and the in-wheel payload directory was renamedpython_packages/→dsl_packages/. The script still runspip download --no-deps nvidia-cutlass-dsl, so it gets only the shim, extracts nothing, and exits 0 anyway.Fix
Requires-Distentries within thenvidia-cutlass-dsl-libs-*family transitively, restricted to one CUDA variant (--cu12default /--cu13, matchingsetup.sh), and extract all of them.python_packages/cutlass/dsl_packages/cutlasstree (the payload now spans several wheels) instead of only the first match.Repro / verification
Verified: 4.6.1 cu12 end-to-end (import +
cute.compileof a trivial kernel, no GPU required), cu13 dependency resolution, unchanged behavior on the pre-split 4.3.5 wheel, and the new failure messages.Related: #3204 attempted this earlier (now stale); this PR is confined to
prep_editable_install.py, follows the shim's ownRequires-Distpins (so it keeps working when the companion set changes, e.g. the cu12/core additions in 4.6.x), and keeps the CUDA-variant choice consistent withsetup.sh --cu12/--cu13.