[FRONTEND] Normalize negative dim in sort/topk #12559
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 208 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.320
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #12559"
general
weight: 0.35
jay87406
tl.sort,tl.topkandtl.bitonic_mergerejectdim=-1:even though -1 is the minor dimension. Normalize
dimwithcore._wrap_axisbefore the check. It's wrapped withconstexpr_functionin standard.py so it can be called from@jitcode, likeget_int_dtype. Any other dim is still rejected with the same message, and an out-of-range dim now gets_wrap_axis's "invalid axis" error.test_sort_negative_dimcallstl.sort,tl.topkandtl.bitonic_mergewithdim=-1and compares against torch. It fails without this change. I ran it withTRITON_INTERPRET=1and checked the compiled path through the frontend, but haven't run it on a GPU.New contributor declaration
rules.
pre-commit run --from-ref origin/main --to-ref HEAD.- [x] I have added tests.
-
/testforlittests-
/unittestfor C++ tests-
/python/testfor end-to-end tests- [ ] This PR does not need a test because
FILL THIS IN.- [x] I have not added any
littests.- [ ] The
littests I have added follow these best practices,including the "tests should be minimal" section. (Usually running Python code
and using the instructions it generates is not minimal.)