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 33#include " llvm/ADT/TypeSwitch.h"
44
55#include " intel/include/Analysis/Utility.h"
6+ #include " intel/include/Dialect/TritonIntelGPU/Transforms/Utility.h"
67
78namespace mlir ::triton::gpu {
89namespace {
@@ -27,6 +28,21 @@ struct ConvertLayoutOpUsingLinearLayoutsConversion
2728 auto srcTy = op.getSrc ().getType ();
2829 auto dstTy = op.getType ();
2930
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+
3046 LinearLayout conversion = minimalCvtLayout (srcTy, dstTy);
3147 LinearLayout srcLayout =
3248 toLinearLayout (srcTy.getShape (), srcTy.getEncoding ());
You can’t perform that action at this time.
0 commit comments