-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix(tests): skip tests/prims_ts instead of erroring when CUTLASS DSL < 4.7 #5215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aleozlx
wants to merge
3
commits into
flashinfer-ai:main
Choose a base branch
from
aleozlx:fix/cutlass-dsl-floor-parity
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+136
β16
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
64633da
fix(tests): skip tests/prims_ts instead of erroring when CUTLASS DSL β¦
aleozlx 9b5a3c8
test(prims_ts): enforce the collect_ignore list under a simulated DSLβ¦
aleozlx 9bdf826
fix(tests): ignore every prims_ts module that imports cutlass.experimβ¦
aleozlx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mechanism itself is right and the exit-code-5 rationale in this docstring is the part to keep exactly as-is β module-level
skips trading "red for red" on directory-scoped runs is a trap most people would have walked into. The gap is only that the
collect_ignore list is a load-bearing claim with no enforcement: the next test module added with an eager DSL import silently
resurrects #5213. Suggest adding the simulation as a CI-runnable meta-check β stub plugin (~15 lines) + pytest tests/prims_ts
--collect-only, assert exit 0:
(A naive blocker that fails cutlass.experimental outright doesn't work as a simulator β on the 4.7 wheel, import cutlass itself
eagerly chains into experimental.primitives, so the stub has to satisfy the parent while leaving the submodules missing.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in
9b5a3c81β took your simulator approach essentially as written.test_prims_ts_directory_still_collects_without_cutlass_experimentalwrites the stub to a tmp dir, runspytest tests/prims_ts --collect-only -p dsl46_stub, and asserts exit 0. It lives intests/test_prims_ts_import_isolation.pyrather than undertests/prims_ts/so it still runs on lanes where that directory is skipped.Your parenthetical was the load-bearing part and I verified it rather than trusting it: with a package whose
__init__doesfrom .experimental import primitives(emulating 4.7's eager chain), the stub yieldsImportError: cannot import name 'primitives' from 'cutlass.experimental'whilecutlass.experimentalitself still resolves with__path__=[].ensure_cutlass_dsl_experimentalcatches that via itsexcept BaseException, so it lands in the unavailable path β which is the state we want to simulate. A finder that failedcutlass.experimentaloutright would have brokenimport cutlassitself and simulated the wrong thing, exactly as you said.Also worth recording why exit 0 is the right assertion: a missed module raises during collection (exit 2), and a module-level skip collects nothing and exits 5 β so the check catches both the regression and the tempting wrong fix.