forked from openxla/xla
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Rocm jaxlib v0.4.30 qa cleanup #35
Merged
hsharsha
merged 10 commits into
rocm-jaxlib-v0.4.30-qa
from
rocm-jaxlib-v0.4.30-qa-cleanup
Aug 29, 2024
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
49f81a7
workspace fixing
pemeliya b61059e
[ROCM] Updated fp8 matmul with adjustments for updated hipBlasLt support
wenchenvincent 2e76267
[ROCM] Addressed reviewer comment.
wenchenvincent 652fd38
[ROCM] Fix build after 21311f23028acfd4bc2c3e4a3f76bad8c9e640e8
draganmladjenovic e085f5d
[ROCM] Add basic scaffolding and enable MLIR fusion
draganmladjenovic b9622e2
Enable dot algorithms for AMD GPUs
hsharsha 9560ccf
Fix MLIR tests specifically w.r.t number of threads and number of blocks
hsharsha f57f22a
Disable FP8 rewrite pattern test on ROCm
hsharsha 339dde0
Disable workspace setting
hsharsha 8ae1de7
Merge branch 'rocm-jaxlib-v0.4.30-qa' into rocm-jaxlib-v0.4.30-qa-cle…
hsharsha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From a46b9e979ffa523bfed61487a2404e1f48140288 Mon Sep 17 00:00:00 2001 | ||
From: Dragan Mladjenovic <[email protected]> | ||
Date: Fri, 29 Mar 2024 12:27:36 +0000 | ||
Subject: [PATCH] Support gpu::ShuffleMode::DOWN lowering | ||
|
||
--- | ||
mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp | 6 +++++- | ||
1 file changed, 5 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp | ||
index e2cb3687d872..9317e30290c6 100644 | ||
--- a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp | ||
+++ b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp | ||
@@ -140,7 +140,7 @@ struct GPUShuffleOpLowering : public ConvertOpToLLVMPattern<gpu::ShuffleOp> { | ||
Value srcLaneId = getLaneId(rewriter, loc, indexBitwidth); | ||
|
||
auto int32Type = IntegerType::get(rewriter.getContext(), 32); | ||
Value width = adaptor.getWidth(); | ||
Value zero = rewriter.create<LLVM::ConstantOp>(loc, int32Type, 0); | ||
Value negwidth = rewriter.create<LLVM::SubOp>(loc, int32Type, zero, width); | ||
Value add = rewriter.create<LLVM::AddOp>(loc, int32Type, srcLaneId, width); | ||
@@ -151,6 +151,10 @@ struct GPUShuffleOpLowering : public ConvertOpToLLVMPattern<gpu::ShuffleOp> { | ||
// TODO: Use ds_swizzle for XOR when step/offsets are constants for better | ||
// perf. | ||
switch (op.getMode()) { | ||
+ case gpu::ShuffleMode::DOWN: | ||
+ dstLane = rewriter.create<LLVM::AddOp>(loc, int32Type, srcLaneId, | ||
+ adaptor.getOffset()); | ||
+ break; | ||
case gpu::ShuffleMode::XOR: | ||
dstLane = rewriter.create<LLVM::XOrOp>(loc, int32Type, srcLaneId, | ||
adaptor.getOffset()); | ||
-- | ||
2.25.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From a46b9e979ffa523bfed61487a2404e1f48140288 Mon Sep 17 00:00:00 2001 | ||
From: Dragan Mladjenovic <[email protected]> | ||
Date: Fri, 29 Mar 2024 12:27:36 +0000 | ||
Subject: [PATCH] Support gpu::ShuffleMode::DOWN lowering | ||
|
||
--- | ||
mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp | 6 +++++- | ||
1 file changed, 5 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp | ||
index e2cb3687d872..9317e30290c6 100644 | ||
--- a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp | ||
+++ b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp | ||
@@ -140,7 +140,7 @@ struct GPUShuffleOpLowering : public ConvertOpToLLVMPattern<gpu::ShuffleOp> { | ||
Value srcLaneId = getLaneId(rewriter, loc, indexBitwidth); | ||
|
||
auto int32Type = IntegerType::get(rewriter.getContext(), 32); | ||
Value width = adaptor.getWidth(); | ||
Value zero = rewriter.create<LLVM::ConstantOp>(loc, int32Type, 0); | ||
Value negwidth = rewriter.create<LLVM::SubOp>(loc, int32Type, zero, width); | ||
Value add = rewriter.create<LLVM::AddOp>(loc, int32Type, srcLaneId, width); | ||
@@ -151,6 +151,10 @@ struct GPUShuffleOpLowering : public ConvertOpToLLVMPattern<gpu::ShuffleOp> { | ||
// TODO: Use ds_swizzle for XOR when step/offsets are constants for better | ||
// perf. | ||
switch (op.getMode()) { | ||
+ case gpu::ShuffleMode::DOWN: | ||
+ dstLane = rewriter.create<LLVM::AddOp>(loc, int32Type, srcLaneId, | ||
+ adaptor.getOffset()); | ||
+ break; | ||
case gpu::ShuffleMode::XOR: | ||
dstLane = rewriter.create<LLVM::XOrOp>(loc, int32Type, srcLaneId, | ||
adaptor.getOffset()); | ||
-- | ||
2.25.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this is really correct. I guess FP8 support begins from MI300 arch? But I see that we have the same check also on upstream