Skip to content

Commit 9706b7c

Browse files
Skip TensorLayoutInterface verification on advanced path
Signed-off-by: Whitney Tsang <[email protected]>
1 parent b19c43a commit 9706b7c

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

lib/Dialect/TritonGPU/IR/Dialect.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "triton/Tools/LayoutUtils.h"
2424
#include "triton/Tools/LinearLayout.h"
2525
#include "triton/Tools/StrUtil.h"
26+
#include "triton/Tools/Sys/GetEnv.hpp"
2627
#include "llvm/ADT/SmallSet.h"
2728
#include "llvm/ADT/TypeSwitch.h"
2829
#include "llvm/Support/MathExtras.h"
@@ -2981,6 +2982,8 @@ struct TritonGPUVerifyTensorLayoutInterface
29812982
if (!distr)
29822983
return makeErr()
29832984
<< "Non-distributed layout is not allowed in tensor type.";
2985+
if (mlir::triton::tools::getBoolEnv("TRITON_INTEL_ADVANCED_PATH"))
2986+
return success();
29842987
auto rank = distr.getRepOrder().size();
29852988
if (rank != rankedTy.getRank())
29862989
return makeErr() << "Layout has rank " << rank

test/TritonIntelGPU/distribute-to-warps.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: triton-opt %s -split-input-file -tritonintelgpu-distribute-to-warps | FileCheck %s
1+
// RUN: env TRITON_INTEL_ADVANCED_PATH=1 triton-opt %s -split-input-file -tritonintelgpu-distribute-to-warps | FileCheck %s
22

33
#blocked1 = #ttg.blocked<{sizePerThread = [32, 32], threadsPerWarp = [1, 1], warpsPerCTA = [4, 1], order = [1, 0], CTAsPerCGA = [1, 1], CTASplitNum = [1, 1], CTAOrder = [0, 1]}>
44
#blocked2 = #ttg.blocked<{sizePerThread = [32, 32], threadsPerWarp = [1, 1], warpsPerCTA = [1, 4], order = [1, 0], CTAsPerCGA = [1, 1], CTASplitNum = [1, 1], CTAOrder = [0, 1]}>

test/TritonIntelGPU/match-target-size.mlir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: env TRITON_INTEL_REDUCE_TRANSPOSE=1 \
1+
// RUN: env TRITON_INTEL_ADVANCED_PATH=1 TRITON_INTEL_REDUCE_TRANSPOSE=1 \
22
// RUN: triton-opt %s -split-input-file -tritonintelgpu-match-target-size | FileCheck %s --check-prefixes=CHECK,CHECK-TR-RED
3-
// RUN: triton-opt %s -split-input-file -tritonintelgpu-match-target-size | FileCheck %s --check-prefixes=CHECK,CHECK-SG-RED
3+
// RUN: env TRITON_INTEL_ADVANCED_PATH=1 triton-opt %s -split-input-file -tritonintelgpu-match-target-size | FileCheck %s --check-prefixes=CHECK,CHECK-SG-RED
44

55
#warp = #ttig.warp<{sizePerThread = [32, 64], threadsPerWarp = [1, 1], order = [1, 0]}>
66
#dot0_ = #ttg.dot_op<{opIdx = 0, parent = #warp}>

test/TritonIntelGPU/slm-match-target-size.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: env TRITON_INTEL_ENABLE_FIRST_LOAD_TO_SLM=1 triton-opt %s -tritonintelgpu-match-target-size | FileCheck %s
1+
// RUN: env TRITON_INTEL_ADVANCED_PATH=1 TRITON_INTEL_ENABLE_FIRST_LOAD_TO_SLM=1 triton-opt %s -tritonintelgpu-match-target-size | FileCheck %s
22

33
#warp = #ttig.warp<{sizePerThread = [32, 64], threadsPerWarp = [1, 1], order = [1, 0]}>
44
#dot0 = #ttg.dot_op<{opIdx = 0, parent = #warp}>

0 commit comments

Comments
 (0)