refactor: remediate Python codecheck findings in PTODSL and TileOps - #1469
Closed
Zhendong404 wants to merge 2 commits into
Closed
refactor: remediate Python codecheck findings in PTODSL and TileOps#1469Zhendong404 wants to merge 2 commits into
Zhendong404 wants to merge 2 commits into
Conversation
Squash of a88c7f908..d3adacdef (8 commits) into one semantically equivalent change: - split oversized functions/methods in lib/TileOps/a5, lib/SoftOps, ptodsl and packaging below the method-size/complexity gates - split ptodsl/_ast_rewrite.py into a facade plus _ast_rewrite_errors/_analysis/_normalizers/_lowering so every file stays below the file-size gate - bundle long argument/return lists into plan/state objects, order private class methods, and inline redundant helpers - restore the straight-line tload burst for contiguous dim0 loads so emitted IR matches gc/master byte-for-byte Pure refactor; DSL/TileOps/PTODSL behavior is unchanged. Verified by ctest -L PTODSL (43/43), py_compile, git diff --check, and byte-identical MLIR comparisons against gc/master.
- Refresh the ptoas-vmi pyproject patch for the current requires-python floor. - Set legacy CMake policies before fetching cann-cmake and default the third-party directory into the writable CMake binary tree when unset.
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
This PR carries two commits:
refactor: remediate Python codecheck findings in PTODSL and TileOpslib/TileOps/a5,lib/SoftOps,ptodslandpackagingbelow the method-size/complexity gatesptodsl/_ast_rewrite.pyinto a facade plus_ast_rewrite_errors/_analysis/_normalizers/_loweringso each file stays below the file-size gatetloadburst for contiguous dim0 loads so emitted IR stays byte-identical to the mainlineci: repair GitHub mirror build checkspyproject.toml.patchfor the currentrequires-python >= 3.10floorinclude(cmake/fetch_cann_cmake.cmake)and default the CANN third-party directory into the writable CMake binary tree when unset (3 files, +22/-10)Validation
python3 -m py_compile: passgit diff --check: passctest -L PTODSL -j 4: 43/43 pass (incl.ptodsl_tilelib_catalog,ptodsl_tilelib_elementwise, jit_compile, scf_while_ast, section)