Skip to content

docs: document AMDGPU LDS transposing read instructions - #24911

Open
linsen458-spec wants to merge 1 commit into
iree-org:mainfrom
linsen458-spec:docs/lds-transpose
Open

linsen458-spec wants to merge 1 commit into
iree-org:mainfrom
linsen458-spec:docs/lds-transpose

Conversation

@linsen458-spec

Copy link
Copy Markdown
Contributor

While digging into how IREE lowers shared memory copies on AMDGPU I noticed the ds_read_tr family (ds_read_b{N}_tr_b{M}) is used in the codebase but never explained anywhere in the docs, so I wrote up what I could piece together.

This adds a section to the AMDGPU doc covering: what the transposing LDS reads do and which chipsets have them; how IREE ends up generating them (the amdgpu.transpose_load MLIR op and the iree-rocdl-load-to-transpose-load pass); the lane_constant / lane_increment index hints the rewrite relies on; what a transfer_read has to look like for the pass to kick in; the index remapping the rewrite performs; and the related global_load_tr path (amdgpu.global_transpose_load) on RDNA4.

Everything is based on the actual pass implementation and the LLVM AMDGPU definitions, not just vendor docs.

Fixes #22537

Document the ds_read_b{N}_tr_b{M} (ds_read_tr) LDS transpose read family
and how IREE generates them: the amdgpu.transpose_load MLIR op, the
iree-rocdl-load-to-transpose-load pass, the lane_constant/lane_increment
index hints it relies on, the requirements a transfer_read must satisfy,
the index remapping performed by the rewrite, chipset support, and the
related global_load_tr (amdgpu.global_transpose_load) path on RDNA4.

Fixes iree-org#22537

Signed-off-by: linsen <251731047+linsen458-spec@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Hello @linsen458-spec 👋

Thank you for submitting a Pull Request to IREE! It looks like this is your first one. We have one ask, and you can also find some general tips below.


Action required: acknowledge IREE project policies

IREE is a Linux Foundation project. All participants are expected to follow the LF Projects Code of Conduct.

All contributions to IREE must follow our IREE AI Tool Use Policy. In particular:

  • Contributors must fully understand, and vouch for, all submitted changes and the intent behind them.
  • Substantial use of LLM/generative AI tools must be noted in the PR description, e.g. via Assisted-by: tool-name or Co-authored-by: tool-name tool@email trailers.
  • Contributors must write PR descriptions themselves. There must always be a human in the loop: contributors must respond to reviews and questions by themselves.
    If a response includes LLM-assisted segments (e.g. reproducers, LLM agent analysis excerpts), the segment should be clearly marked as "assisted", same as for PR contents.
  • GitHub issues labeled as "Good first issue" are explicitly designated as learning opportunities for newcomers to the project. With exceptions for boilerplate edits, AI tool usage for resolutions to such issues is forbidden.

We kindly ask you to reply to this message and confirm that you understand and accept the cited policies, particularly the AI Tool Use Policy.


General guidance

Our general Contributing guide contains information and links to detailed guides on code quality, testing, commit summaries and our CI system.

A common point for new PRs: if a DCO signing check fails for you, check out the section on Developer Certificate of Origin.
In these cases, it should suffice to amend your commit signature(s) per the guide and force-push the PR branch.

If you have any questions, feel free to leave a comment here, or ask away on IREE Discord.

Thank you,
The IREE Community

@linsen458-spec

Copy link
Copy Markdown
Contributor Author

Gentle ping — this docs PR (Fixes #22537) has been sitting with four requested reviewers for about two weeks. Is there a better person to route it to?

This branch has not been deployed

No deployments
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.

Document LDS transposing read instructions

1 participant