Skip to content

[DNR][BACKEND] Reduce layout conversions at memory boundaries - #11161

Draft
jeffniu-openai wants to merge 4 commits into
mainfrom
jeffniu/legacy-layout-backports
Draft

[DNR][BACKEND] Reduce layout conversions at memory boundaries#11161
jeffniu-openai wants to merge 4 commits into
mainfrom
jeffniu/legacy-layout-backports

Conversation

@jeffniu-openai

@jeffniu-openai jeffniu-openai commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

PR description written by Codex

Improve legacy layout-conversion removal by rematerializing packed store expressions in their final layout, preserving native pointer and mask layouts, keeping narrowing computations in their input layout, and sharing exchanges across selected value/index outputs and floating-point validity predicates.

Validated with all 148 TritonGPU/TritonNvidiaGPU lit tests, 17 GPU correctness tests, and a 31,693-kernel production replay: 1,329 improved, 2,543 fewer layout conversions, and no regressions. Representative packed downcasts reduce shared memory from 16 KiB to 4 KiB; top-k reduces barriers from 9 to 3 and PTX instructions from 675 to 526.

Stack

Merge bottom-up:

Rebuild scalar-rooted join and reshape expressions directly in the fixed store layout instead of exchanging packed values through shared memory.

Across 31,693 frozen production cases, remove 30 layout conversions from five kernels without increasing conversions or changing observable memory or reduction counts. Add MLIR coverage and eight GB300 correctness variants.
Keep matching store pointers and predicates in their existing layout and convert only the reduced payload.

Remove two conversions from all 490 production top-k corpus cases without increasing conversions in the 31,693-case corpus. Add focused MLIR and GPU coverage.
@jeffniu-openai jeffniu-openai changed the title [BACKEND] Reduce layout conversions at memory boundaries [DNR][BACKEND] Reduce layout conversions at memory boundaries Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant