Repository navigation
Conversation
This branch has not been deployed
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
scripts/check_conventions.pyto enforce project-specific conventions that are not covered byclang-formatorruff..github/workflows/conventions.ymlso the checker runs in CI forpushandpull_requestevents.CONTRIBUTING.md.Motivation
The project has contribution rules that generic formatters do not enforce, such as blank-line spacing between class members and repository-specific PR/commit checks. This PR adds an automated checker so those rules can run in CI and be reproduced locally.
N/A: no linked issue.
Type of Change
feat— new feature / new operator / new platformfix— bug fixperf— performance improvement (no behavioral change)refactor— code restructuring without behavior changetest— adding or fixing tests onlydocs— documentation onlybuild/ci— build system or CI configurationchore— tooling, formatting, or other non-code changes!in the Conventional Commits prefix or aBREAKING CHANGE:footer)Platforms Affected
WITH_CPU)WITH_NVIDIA)WITH_ILUVATAR)WITH_METAX)WITH_CAMBRICON)WITH_MOORE)WITH_ASCEND)WITH_TORCH)Test Results on Supported Platforms
Result file generated locally:
ci-results/remote/convention-checker-20260507-120000/RESULTS.md.Command:
pytestResult5 failed, 3108 passed, 1000 skipped in 195.73stests/test_cast.pyandtests/test_linear.py;test.logincludesFatal Python error: Aborted.5 failed, 2909 passed in 231.89stests/test_cast.pyandtests/test_linear.py;test.logincludesFatal Python error: Aborted.5 failed, 5452 passed, 1072 skipped in 376.41stests/test_cast.py,tests/test_linear.py, andtests/test_matmul.py;test.logincludesFatal Python error: Aborted.17 failed, 3061 passed, 3770 skipped in 919.28stests/test_add.pyand CPUtests/test_matmul.py; first detailed error includesRuntimeError: "random_" not implemented for 'Short'.305 failed, 5450 passed, 1387 skipped in 727.70stests/test_gemm.pyand CPUtests/test_matmul.py; first detailed error includesRuntimeError: MmCall MUDNN failed in: RunWithBiasAdd.5 failed, 3815 passed, 90 skipped in 502.19s; script exittest=137test.logcontains a pytest summary despite Docker/script exit137; failures are in CPUtests/test_matmul.py.Additional local validation
Result file content
Benchmark / Performance Impact
N/A. This PR adds developer tooling and CI checks only.
Notes for Reviewers
The multi-platform runtime test suite did not pass, but the failures are in existing runtime operator tests while this PR only changes tooling, CI, and documentation. This PR is opened as draft so the failed platform results are visible before review.
Checklist
Title, Branch, and Commits
feat(nvidia): …,fix(cuda/gemm): …).<type>/xxx-yyyy-zzzzwhere<type>matches the PR title's Conventional Commits type and words are joined with hyphens (seeCONTRIBUTING.md§Branches).master— the branch is rebased cleanly on top of the currentmaster.fixup!/squash!/wipcommits remain.Scope and Design
CONTRIBUTING.md§Code/General).printf/std::cout/print(...)left behind, orTODOwithout an owner and issue link.General Code Hygiene (applies to all languages)
CONTRIBUTING.md§Code/General).CONTRIBUTING.md§Code/General).the `seqlens_k` tensor) (CONTRIBUTING.md§Code/General).CONTRIBUTING.md§Code/General).CONTRIBUTING.md§Code/General; §Python).C++ Specific (if C++ files changed)
N/A: no C++ files changed.
Python Specific (if Python files changed)
ruff checkpasses cleanly on CI (see.github/workflows/ruff.yml).ruff format --checkpasses cleanly — if not, runruff formatand commit the result.CONTRIBUTING.md§Python).CONTRIBUTING.md§Python).CONTRIBUTING.md§Python).if,for, and similar control-flow statements (CONTRIBUTING.md§Python).return, except when it directly follows a control-flow statement (CONTRIBUTING.md§Python).CONTRIBUTING.md§Python).Testing
pytestwas run locally on every supported platform that this PR can affect, and the results are recorded in the "Test Results" table above (CONTRIBUTING.md§Pull Requests).Payload-returning test was added.dtype/deviceparameterization was added.Build, CI, and Tooling
pip install .[dev]on affected platforms; all multi-platform runs reportedbuild=0.compile_commands.jsonbehavior was not changed.clang-format.yml,ruff.yml) are green locally or expected to be green on CI; this PR also addsconventions.yml.pyproject.toml.Documentation
CONTRIBUTING.mdwas updated for the new developer workflow.Security and Safety