Skip to content

Conversation

@jwanggit86
Copy link
Contributor

@jwanggit86 jwanggit86 commented Jan 21, 2025

The AMDGPUUsage.rst file is updated to document tow intrinsics: llvm.amdgcn.mov.dpp and llvm.amdgcn.update.dpp.

@llvmbot
Copy link
Member

llvmbot commented Jan 21, 2025

@llvm/pr-subscribers-llvm-ir

@llvm/pr-subscribers-backend-amdgpu

Author: Jun Wang (jwanggit86)

Changes

The AMDGPUUsage.rst file is updated to document tow intrinsics: llvm.amdgcn.move.dpp and llvm.amdgcn.update.dpp.


Full diff: https://github.com/llvm/llvm-project/pull/123816.diff

1 Files Affected:

  • (modified) llvm/docs/AMDGPUUsage.rst (+12)
diff --git a/llvm/docs/AMDGPUUsage.rst b/llvm/docs/AMDGPUUsage.rst
index 40b393224f15dd..132a7444805620 100644
--- a/llvm/docs/AMDGPUUsage.rst
+++ b/llvm/docs/AMDGPUUsage.rst
@@ -1422,6 +1422,18 @@ The AMDGPU backend implements the following LLVM IR intrinsics.
                                                    Returns a pair for the swapped registers. The first element of the return
                                                    corresponds to the swapped element of the first argument.
 
+  llvm.amdgcn.mov.dpp                              The llvm.amdgcn.mov.dpp.i32 intrinsic represents the mov.dpp operation in AMDGPU.
+                                                   This operation is being deprecated and can be replaced with llvm.amdgcn.update.dpp.
+
+  llvm.amdgcn.update.dpp                           The llvm.amdgcn.update.dpp intrinsic represents the update.dpp operation in AMDGPU.
+                                                   It takes an old value, a source operand, a DPP control operand, a row mask, a bank mask, and a bound control.
+                                                   This operation is equivalent to a sequence of v_mov_b32 operations.
+                                                   It is preferred over llvm.amdgcn.mov.dpp.i32 for future use.
+                                                   `llvm.amdgcn.update.dpp.i32 <old> <src> <dpp_ctrl> <row_mask> <bank_mask> <bound_ctrl>`
+                                                   Should be equivalent to:
+                                                   - `v_mov_b32 <dest> <old>`
+                                                   - `v_mov_b32 <dest> <src> <dpp_ctrl> <row_mask> <bank_mask> <bound_ctrl>`
+
   ==============================================   ==========================================================
 
 .. TODO::


llvm.amdgcn.update.dpp The llvm.amdgcn.update.dpp intrinsic represents the update.dpp operation in AMDGPU.
It takes an old value, a source operand, a DPP control operand, a row mask, a bank mask, and a bound control.
This operation is equivalent to a sequence of v_mov_b32 operations.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is misleading, it's not a mere v_mov_b32.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this was copied directly from the comments in IntrinsicsAMDGPU.td so fixes to the description should go there first (or as well).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it was copied from the .td file. @arsenm How should this be changed?

Copy link
Contributor

@arsenm arsenm Jan 23, 2025

Choose a reason for hiding this comment

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

Should mention it's v_mov_b32 with DPP, and mention the types it supports. It's not just i32 anymore

Copy link
Contributor

Choose a reason for hiding this comment

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

Just remove this line? It already says below exactly what v_mov_b32 instructions it is equivalent to.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a line to mention supported data types. Previously missed ".i32" suffix has been changed to ".".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will update the .td file correspondingly once this file is done.

The AMDGPUUsage.rst file is updated to document tow intrinsics:
llvm.amdgcn.move.dpp and llvm.amdgcn.update.dpp.
@jwanggit86 jwanggit86 force-pushed the update-AMDGPUUsage-doc branch from 60ec501 to 4067e14 Compare January 24, 2025 20:14
@jwanggit86 jwanggit86 merged commit 77c23fd into llvm:main Jan 24, 2025
9 checks passed
@jwanggit86 jwanggit86 deleted the update-AMDGPUUsage-doc branch January 27, 2025 18:23
searlmc1 pushed a commit to ROCm/llvm-project that referenced this pull request Feb 3, 2025
The AMDGPUUsage.rst file is updated to document two intrinsics:
llvm.amdgcn.mov.dpp and llvm.amdgcn.update.dpp.
searlmc1 pushed a commit to ROCm/llvm-project that referenced this pull request Feb 3, 2025
…SWDEV-443122

[AMDGPU] Update AMDGPUUsage.rst to document two intrinsics (llvm#123816)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants