File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
third_party/intel/lib/TritonIntelGPUToLLVM Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 3
3
#include " llvm/ADT/TypeSwitch.h"
4
4
5
5
#include " intel/include/Analysis/Utility.h"
6
+ #include " intel/include/Dialect/TritonIntelGPU/Transforms/Utility.h"
6
7
7
8
namespace mlir ::triton::gpu {
8
9
namespace {
@@ -27,6 +28,21 @@ struct ConvertLayoutOpUsingLinearLayoutsConversion
27
28
auto srcTy = op.getSrc ().getType ();
28
29
auto dstTy = op.getType ();
29
30
31
+ if (auto srcTensorTy = cast<RankedTensorType>(srcTy)) {
32
+ if (auto dstTensorTy = cast<RankedTensorType>(dstTy)) {
33
+ // TODO: replace this with proper conversion once conversion is removed
34
+ // from LoadStoreOpToLLVM.
35
+ if (intel::hasSubgroup2DBlockEncoding (srcTensorTy) &&
36
+ intel::hasDotDpasEncoding (dstTensorTy)) {
37
+ // need to delete the op and do nothing
38
+ llvm::errs () << " need to delete op " << op << " \n " ;
39
+ // what if we just delete it
40
+ rewriter.replaceOp (op, op.getSrc ());
41
+ return success ();
42
+ }
43
+ }
44
+ }
45
+
30
46
LinearLayout conversion = minimalCvtLayout (srcTy, dstTy);
31
47
LinearLayout srcLayout =
32
48
toLinearLayout (srcTy.getShape (), srcTy.getEncoding ());
You can’t perform that action at this time.
0 commit comments