Repository navigation
[JIT] fix(jit): keep detached-head advice local to third-party clone - #5938
Conversation
Signed-off-by: Xucheng Zhou <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
|
No activity for 15 days, so this is now labelled |
|
@aiter-bot review |
|
@adenzhou1350 pls update code format. |
ROCm/aiter PR #5938 — [JIT] fix(jit): keep detached-head advice local to third-party cloneReplaces the temporary global Review (advisory):
|
Signed-off-by: Xucheng Zhou <[email protected]>
|
Fixed the reported format/lint blocker in Reproduced S102 before the fix; Ruff 0.16.0 and Black 26.3.0 now pass on both changed files. All 3 CPU tests pass on native Windows/Git 2.53, including the real clone/global-config check; The previous Standard Tests were skipped after |
READY FOR HUMAN REVIEWPR Self-ReviewRevision Author self-review accepted. Readiness report: Author answers
Show the author's self-review answersBehavior and intentValidation and unverified scopePR-specific questionChanged op testsPR state
Copilot findings
Code and op-test hygiene
Required CI
Shadow mode reports what would block but keeps the status successful. Set |
Signed-off-by: Xucheng Zhou <[email protected]>
f6bed99 to
54d1687
Compare
|
Merged current main in |
ruanjm
left a comment
There was a problem hiding this comment.
The change in core.py LGTM.
…OCm#5938) * fix(jit): keep detached-head advice local to third-party clone Signed-off-by: Xucheng Zhou <[email protected]> * test(jit): document trusted function execution for CPU coverage Signed-off-by: Xucheng Zhou <[email protected]> --------- Signed-off-by: Xucheng Zhou <[email protected]>
Summary
Keep
advice.detachedHead=falselocal to the third-party clone command instead of temporarily changing the user's global Git configuration. Preserve the existing Git < 2.49 fallback.Motivation
The previous global write could restore an effective repository/system value into the wrong configuration scope, and an interrupted clone could leave the user's configuration changed.
Changes
git -c advice.detachedHead=false clone ...in the modern-Git path.89e00fdfe61e442a559132a3b78811bf2528b19ato restore its existingtests/sources for the current CI workflow. The previous MI35X shard failed before test collection because the old PR tree lacked that directory.Testing
No documentation/API or new dependency change is needed. No breaking changes or performance claim.
PR Self-Review
Reviewed revision
54d1687
Behavior and intent
Only the modern-Git clone changes: its detached-HEAD advice is now command-local. It no longer reads, writes or restores global configuration. The repository URL, pinned revision, destination and clone flags stay the same; the older-Git clone/reset/submodule path remains unchanged.
Validation and unverified scope
On native Windows, Python 3.14.3 and Git 2.53.0.windows.2:
python -m pytest -q op_tests/test_jit_clone_config.py: 3 passed after the main merge.check aiter/jit/core.py op_tests/test_jit_clone_config.py: passed.--checkon both files: passed.git diff --checkagainst main: passed. The clone function's AST and regression test contents are unchanged fromc58aafc496.Full
aiter.jit.coreimport, ROCm execution and hosted CI on this revision remain unverified. These CPU tests load the checked-in function through its AST; they do not import ROCm extensions. Earlierc58aafc496lint checks passed, but its Aiter Test Gate failed afterpython3 -m pytest -q testsreported a missing directory; the new merge supplies those existing upstream files, and a fresh hosted run is still needed.PR-specific question
No tensor workload keys or tuning configurations consume this Git advice setting. The affected caller is
clone_3rdparty("HipKittens")when its directory is missing and Git supportsclone --revision(>= 2.49). The diff changes only the configuration scope of that command; it changes no operator dispatch, shape table, cache key or pinned third-party revision. The legacy-path regression checks its original three commands. This is static/CPU evidence, not validation of every kernel shape.Changed op tests
op_tests/test_jit_clone_config.pyis necessary because existing operator numerical tests do not check user Git configuration. Its modern-path test asserts the single command-local clone, its legacy test preserves clone/reset/submodule behavior, and its real-Git test checks the cloned revision and byte-for-byte preservation of an isolated global configuration. These cover different boundaries; the real-Git test requires Git >= 2.49 and otherwise skips. The explainedexecsuppression is limited to loading this checked-in function for CPU-only coverage.Implementation, tests and this maintenance self-review were AI-assisted.