Skip to content

Commit 4809815

Browse files
Workaround test failures for the swizzling path
Signed-off-by: Whitney Tsang <[email protected]>
1 parent 10a9526 commit 4809815

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

include/triton/Conversion/TritonGPUToLLVM/TargetInfoBase.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ class TargetInfoBase {
9797
virtual bool supportLdMatrix() const { return false; }
9898
virtual bool supportStMatrix() const { return false; }
9999
virtual bool isCuda() const { return false; }
100+
virtual bool isXpu() const { return false; }
100101

101102
// Annotate target specific information to local load operations during
102103
// lowering to LLVM. `llLoadOp` is the generated LLVM load op.

lib/Conversion/TritonGPUToLLVM/ConvertLayoutOpToLLVM.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,9 @@ struct ConvertLayoutOpUsingLinearLayoutsConversion
279279
assert(cvtNeedsSharedMemory(op.getSrc().getType(), op.getType()));
280280

281281
// Try to use swizzling to implement the conversion
282-
if (succeeded(
283-
transferWithinBlockSwizzling(op, adaptor.getSrc(), rewriter))) {
282+
// HACK Remove once XPU tests pass for the swizzling path
283+
if (!targetInfo.isXpu() && succeeded(transferWithinBlockSwizzling(
284+
op, adaptor.getSrc(), rewriter))) {
284285
return success();
285286
}
286287

third_party/intel/lib/TritonIntelGPUToLLVM/TargetInfo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ class TargetInfo : public mlir::triton::TargetInfoBase {
7676
StringRef name, StringRef value,
7777
unsigned addressSpace) const;
7878

79+
bool isXpu() const override { return true; }
80+
7981
protected:
8082
virtual bool isSupportedWarpReduceOp(Operation *op, unsigned numLanesToReduce,
8183
unsigned warpSize) const = 0;

0 commit comments

Comments
 (0)