{{ message }}
Repository navigation
[inductor] Clamp explicit mix-order split size to a power of two on npu - #201600
Open
zhoushaowen69 wants to merge 1 commit into
Open
zhoushaowen69 wants to merge 1 commit into
zhoushaowen69 wants to merge 1 commit into
Conversation
|
The following ciflow label(s) have been added but CI has not been triggered yet because the workflows are awaiting approval:
Once a maintainer approves the workflows (scroll to the bottom of the PR page), the corresponding CI jobs will be triggered automatically. Please ping one of the reviewers if you do not have access to approve and run workflows. |
1 similar comment
|
The following ciflow label(s) have been added but CI has not been triggered yet because the workflows are awaiting approval:
Once a maintainer approves the workflows (scroll to the bottom of the PR page), the corresponding CI jobs will be triggered automatically. Please ping one of the reviewers if you do not have access to approve and run workflows. |
Probed on 910B4 / triton-ascend 3.6 with (40961, 129) bf16 sum(dim=-1)+sum(dim=0): RSPLIT_SIZE values that are powers of two (16/32/64) produce correct results; non-powers of two (18/24/48) miscompile the tail-block mask of the mix-order kernel and over-count 1-3 rows. The upstream heuristic branch already yields a power of two (last_power_of_2, clamped to [16, 128]); only the explicit config.triton.mix_order_reduction_split_size override can produce a non-power-of-two, so clamp it on npu to the largest power of two <= the requested value. Co-Authored-By: Claude Code <noreply@anthropic.com>
zhoushaowen69
force-pushed
the
fix/mix-order-split-size-pow2
branch
2 times, most recently
from
October 21, 2026 11:28
5a26acc to
e80e5e4
Compare
Author
This branch was successfully 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.

On npu (triton-ascend on Ascend 910B4), a non-power-of-two
config.triton.mix_order_reduction_split_sizemiscompiles the tail-blockmask of the mix-order kernel: with a (40961, 129) bf16
sum(dim=-1)+sum(dim=0)probe, split sizes 18/24/48 over-count 1-3 rows of the tail block (each
column's sum is off by an exact multiple of 0.25), while 16/32/64 are correct.
The heuristic branch below already yields a power of two (
last_power_of_2clamped to [16, 128]); only the explicit config override can inject a
non-power-of-two value. Clamp it on npu to the largest power of two <= the
requested value (18→16, 24→16, 48→32), all within the verified-correct set.
Other devices are untouched.
With this clamp, split sizes 16/18/20/24/32/48/64 all produce bit-correct
results on 910B4, and
test/inductor/test_mix_order_reduction.py::MixOrderReductionNumericTest(passing an explicit split size of 18) runs clean.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo
🤖 Generated with Claude Code