[Chore] Remove unreachable legacy expr/rocdl.py#677
Merged
Conversation
The `expr/rocdl/` package shadows the same-named `expr/rocdl.py`: CPython resolves a regular package over a same-named module, so `flydsl.expr.rocdl` (and every import form / the `_LAZY_MODULES` alias) always binds to `expr/rocdl/__init__.py`. `rocdl.py` is therefore dead code, reachable only via explicit file-path loading, and carried a hand-maintained mirroring burden against the package. Remove the file and update the docs/skills that pointed at it to the `expr/rocdl/` package (MFMA/WMMA wrappers live in `expr/rocdl/universal.py`). Verified: no code or build config references it; the package exposes a superset of its public symbols; physically removing the built copy keeps all imports working and the compile-tier unit suite green (287 passed). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the unreachable legacy python/flydsl/expr/rocdl.py module (shadowed by the python/flydsl/expr/rocdl/ package) and updates documentation/skills references to point at the package-based ROCDL intrinsics location.
Changes:
- Delete
python/flydsl/expr/rocdl.py, relying solely onpython/flydsl/expr/rocdl/for ROCDL intrinsics and wrappers. - Update docs to reference
python/flydsl/expr/rocdl/(including MFMA/WMMA, buffer, TDM, cluster utilities). - Update Claude skill docs/guidance to refer to package modules (e.g.,
expr/rocdl/universal.py) instead of the legacy module.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| python/flydsl/expr/rocdl.py | Removes dead/shadowed legacy ROCDL module implementation. |
| docs/kernel_authoring_guide.md | Updates the “Source Files” reference from expr/rocdl.py to the expr/rocdl/ package. |
| docs/architecture_guide.md | Updates the repo tree to show expr/rocdl/ as the ROCDL intrinsics location. |
| CLAUDE.md | Updates repo layout and kernel-authoring conventions to describe expr/rocdl/ as the canonical package. |
| .claude/skills/flydsl-kernel-authoring/SKILL.md | Updates skill references to the expr/rocdl/ package. |
| .claude/skills/add-target-atom-op/SKILL.md | Updates instructions to place new wrappers in expr/rocdl/universal.py instead of the removed module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
coderfeli
approved these changes
Jun 15, 2026
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.
The
expr/rocdl/package shadows the same-namedexpr/rocdl.py: CPython resolves a regular package over a same-named module, soflydsl.expr.rocdl(and every import form / the_LAZY_MODULESalias) always binds toexpr/rocdl/__init__.py.rocdl.pyis therefore dead code, reachable only via explicit file-path loading, and carried a hand-maintained mirroring burden against the package.Remove the file and update the docs/skills that pointed at it to the
expr/rocdl/package (MFMA/WMMA wrappers live inexpr/rocdl/universal.py).Verified: no code or build config references it; the package exposes a superset of its public symbols; physically removing the built copy keeps all imports working and the compile-tier unit suite green (287 passed).
Motivation
Technical Details
Test Plan
Test Result
Submission Checklist