Skip to content

[MLIR][XeGPU]Add MemoryEffect to xegpu.atomic_rmw op #128076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 21, 2025
Merged

Conversation

nbpatel
Copy link
Contributor

@nbpatel nbpatel commented Feb 20, 2025

This PR adds MemWrite memory effect to xegpu.atomic_rmw op

@llvmbot
Copy link
Member

llvmbot commented Feb 20, 2025

@llvm/pr-subscribers-mlir-gpu

@llvm/pr-subscribers-mlir

Author: Nishant Patel (nbpatel)

Changes

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

1 Files Affected:

  • (modified) mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td (+1)
diff --git a/mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td b/mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td
index 7560ede058faa..881f18dbed29c 100644
--- a/mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td
+++ b/mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td
@@ -788,6 +788,7 @@ def XeGPU_DpasOp : XeGPU_Op<"dpas", [Pure, AllElementTypesMatch<["lhs", "rhs"]>]
 }
 
 def XeGPU_AtomicRMWOp: XeGPU_Op<"atomic_rmw", [Pure,
+      MemoryEffects<[MemWrite]>,
       AllElementTypesMatch<["tensorDesc", "value", "result"]>,
       AllShapesMatch<["tensorDesc", "value", "result"]>]> {
   let summary = "Atomic ready-modify-write operation on the TensorDesc. ";

@nbpatel nbpatel changed the title Add MemoryEffect to xegpu.atomic_rmw op [MLIR][XeGPU]Add MemoryEffect to xegpu.atomic_rmw op Feb 20, 2025
@nbpatel
Copy link
Contributor Author

nbpatel commented Feb 20, 2025

@charithaintc @chencha3 please take a look at this

@adam-smnk
Copy link
Contributor

Since we're already here, could you also add MemRead effect?

@chencha3
Copy link
Contributor

Since we're already here, could you also add MemRead effect?

Second this

@nbpatel
Copy link
Contributor Author

nbpatel commented Feb 21, 2025

Since we're already here, could you also add MemRead effect?

Added. Also, fixed a typo

@nbpatel
Copy link
Contributor Author

nbpatel commented Feb 21, 2025

@adam-smnk can you please merge this?

@chencha3 chencha3 merged commit 9546afe into llvm:main Feb 21, 2025
11 checks passed
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.

5 participants