[Frontend] Cleanup: dead code + style nits (issue #241 bundle A)#249
Open
YWHyuk wants to merge 1 commit into
Open
[Frontend] Cleanup: dead code + style nits (issue #241 bundle A)#249YWHyuk wants to merge 1 commit into
YWHyuk wants to merge 1 commit into
Conversation
Trivial low-risk subset of the issue #241 checklist. No semantic changes intended; verified by py_compile on each touched file. - extension_op.py: drop generate_inner_product_matrix (63 lines, no call sites anywhere in the repo). - extension_codecache.py: simplify w_offset block — the conditional `w_offset = kwargs['loop_size'][-1]` branch was followed by an unconditional `w_offset = 0`, making the branch dead. Also unrelated: give TileSizeError a distinct default message ("Tile size constraint violated.") instead of the verbatim copy of SpadOverflowError's ("SPAD overflow occurred.") so tracebacks distinguish them. - mlir/mlir_common.py: drop the duplicate `import sympy` (already imported 5 lines earlier). Fix MLIRMultiDimTile.get_nr_dim return annotation `-> str` → `-> int` (returns `len(self._tile_size)`). - mlir/mlir_scheduling.py: replace bare `except:` (was silently swallowing KeyboardInterrupt/SystemExit) with `except Exception:`. Drop dead `node1 = self.revert_group(node1)` assignment — revert_group mutates act_nodes in place with no return, so the lvalue was rebinding node1 to None and the function returned True immediately afterwards. Refs #241. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Trivial low-risk subset of the #241 cleanup checklist. 4 files changed, +6 / -75 lines. No semantic changes intended.
Refs #241.
Items in this PR
Deferred from #241 (other PRs)
Test plan
🤖 Generated with Claude Code