Skip to content

[Codegen][GPU] Add configurable num-stages option to prefetch pass - #22673

Merged
jerryyin merged 2 commits into
mainfrom
users/zyin/refactor-pipeliner-using-upstream-v3-configure-stage
Nov 18, 2025
Merged

jerryyin merged 2 commits into
mainfrom
users/zyin/refactor-pipeliner-using-upstream-v3-configure-stage

Conversation

@jerryyin

Copy link
Copy Markdown
Member

Adds a --num-stages option to the iree-llvmgpu-prefetch-shared-memory pass, allowing configuration of pipeline stages.

Options:

  • num-stages=1: Disable pipelining (no prefetch)
  • num-stages=2: 2-stage pipeline with distance-1 prefetch (default)

This PR is mostly trivial changes and aim to get the code base ready to plumb through 3 stage pipelining.

@jerryyin
jerryyin force-pushed the users/zyin/refactor-pipeliner-using-upstream-v3-configure-stage branch from 125a2ec to 8e390ed Compare November 17, 2025 19:41

@nirvedhmeshram nirvedhmeshram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kuhar kuhar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % nit

Comment thread compiler/src/iree/compiler/Codegen/LLVMGPU/ROCDLPrefetching.cpp Outdated
@jerryyin
jerryyin force-pushed the users/zyin/refactor-pipeliner-using-upstream-v3-configure-stage branch 2 times, most recently from d62c243 to c609c3a Compare November 17, 2025 20:22
Comment thread compiler/src/iree/compiler/Codegen/LLVMGPU/ROCDLPrefetching.cpp Outdated
@jerryyin
jerryyin force-pushed the users/zyin/refactor-pipeliner-using-upstream-v3-configure-stage branch from c609c3a to 11f0d36 Compare November 17, 2025 20:34
@jerryyin
jerryyin marked this pull request as draft November 17, 2025 20:40
Allows 1-stage (no pipelining) or 2-stage (default) pipeline.

Signed-off-by: jerryyin <zhuoryin@amd.com>
@jerryyin
jerryyin force-pushed the users/zyin/refactor-pipeliner-using-upstream-v3-configure-stage branch from 11f0d36 to f259fe6 Compare November 17, 2025 20:56
@jerryyin
jerryyin marked this pull request as ready for review November 17, 2025 21:15
Signed-off-by: jerryyin <zhuoryin@amd.com>
@jerryyin
jerryyin merged commit 655aa71 into main Nov 18, 2025
49 of 52 checks passed
@jerryyin
jerryyin deleted the users/zyin/refactor-pipeliner-using-upstream-v3-configure-stage branch November 18, 2025 13:48
bangtianliu pushed a commit to bangtianliu/iree that referenced this pull request Nov 19, 2025
…ree-org#22673)

Adds a `--num-stages` option to the
`iree-llvmgpu-prefetch-shared-memory` pass, allowing configuration of
pipeline stages.

**Options:**
- `num-stages=1`: Disable pipelining (no prefetch)
- `num-stages=2`: 2-stage pipeline with distance-1 prefetch (default)

This PR is mostly trivial changes and aim to get the code base ready to
plumb through 3 stage pipelining.

---------

Signed-off-by: jerryyin <zhuoryin@amd.com>
pstarkcdpr pushed a commit to pstarkcdpr/iree that referenced this pull request Nov 28, 2025
…ree-org#22673)

Adds a `--num-stages` option to the
`iree-llvmgpu-prefetch-shared-memory` pass, allowing configuration of
pipeline stages.

**Options:**
- `num-stages=1`: Disable pipelining (no prefetch)
- `num-stages=2`: 2-stage pipeline with distance-1 prefetch (default)

This PR is mostly trivial changes and aim to get the code base ready to
plumb through 3 stage pipelining.

---------

Signed-off-by: jerryyin <zhuoryin@amd.com>
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.

3 participants