Skip to content

[language](fix) Allow non-power-of-two arange ranges - #1884

Open
Ritsuka314 wants to merge 1 commit into
triton-lang:main-devfrom
Ritsuka314:fix/remove-non-power-of-two-check
Open

[language](fix) Allow non-power-of-two arange ranges#1884
Ritsuka314 wants to merge 1 commit into
triton-lang:main-devfrom
Ritsuka314:fix/remove-non-power-of-two-check

Conversation

@Ritsuka314

Copy link
Copy Markdown
Contributor

Rationale

AscendNPU-IR now supports non-power-of-two tensor shapes, but the Triton Ascend patch still rejects non-power-of-two tl.arange ranges in SIMT mode before they reach lowering. The same patch already relaxes the generic Python block-shape and C++ tensor-size restrictions.

Remove the remaining semantic guard so both SIMD and SIMT compilation can use the downstream non-power-of-two support.

This is the Triton-Ascend frontend companion to AscendNPU-IR !1357, which adds the corresponding downstream support and regression coverage.

Validation

  • git apply --check third_party/ascend/patch/triton-ascend-3.6.0.patch
  • pre-commit run --from-ref github-upstream/main-dev --to-ref HEAD
  • Build and device execution were not run; this machine has no Ascend NPU, and submodule initialization was intentionally skipped.

New contributor declaration

  • I am not making a trivial change, such as fixing a typo in a comment.
  • I have written a PR description following these rules: https://cbea.ms/git-commit/#why-not-how.
  • I have run pre-commit from the PR base to HEAD.
  • This PR does not add a test because it removes a frontend rejection whose downstream behavior is covered by the linked AscendNPU-IR feature validation.
  • I have not added any lit tests.

Signed-off-by: Ritsuka314 <Ritsuka@huawei.com>
@github-actions github-actions Bot added python Changes to Python runtime or bindings ascend-backend Changes to the Ascend NPU backend labels Aug 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

OpenCodeReview: Review skipped: no items were selected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ascend-backend Changes to the Ascend NPU backend python Changes to Python runtime or bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant