Make ops that fusion is not supported live in their own dispatch function.
This unblocks compling ASR model end to end on vulkan-spirv backend. The fusion
of these ops is not supported at this moment, so put them into their dispatch
function temporally.
PiperOrigin-RevId: 318428815
diff --git a/iree/compiler/Dialect/Flow/Transforms/DispatchConfig.cpp b/iree/compiler/Dialect/Flow/Transforms/DispatchConfig.cpp
index 1df92f2..3af7f8c 100644
--- a/iree/compiler/Dialect/Flow/Transforms/DispatchConfig.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/DispatchConfig.cpp
@@ -34,7 +34,9 @@
bool isUnsupportedFusionOp(Operation *op) {
return isa<xla_hlo::DotOp>(op) || isa<xla_hlo::ConvOp>(op) ||
isa<xla_hlo::ReduceOp>(op) || isa<xla_hlo::PadOp>(op) ||
- isa<xla_hlo::ReduceWindowOp>(op);
+ isa<xla_hlo::ReduceWindowOp>(op) ||
+ isa<xla_hlo::TorchIndexSelectOp>(op) || isa<xla_hlo::SliceOp>(op) ||
+ isa<xla_hlo::ConcatenateOp>(op);
}
// Allowlist of ops that materialize to a an index-permuted copy of some kind
diff --git a/iree/compiler/Dialect/Flow/Transforms/FoldCompatibleDispatchRegions.cpp b/iree/compiler/Dialect/Flow/Transforms/FoldCompatibleDispatchRegions.cpp
index c83cb09..53878d6 100644
--- a/iree/compiler/Dialect/Flow/Transforms/FoldCompatibleDispatchRegions.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/FoldCompatibleDispatchRegions.cpp
@@ -199,7 +199,8 @@
// TODO(b/144530470): replace with tablegen attributes/interfaces.
if (isa<xla_hlo::ReduceOp>(op) || isa<xla_hlo::DotOp>(op) ||
isa<xla_hlo::ConvOp>(op) || isa<xla_hlo::ReduceWindowOp>(op) ||
- isa<xla_hlo::PadOp>(op)) {
+ isa<xla_hlo::PadOp>(op) || isa<xla_hlo::TorchIndexSelectOp>(op) ||
+ isa<xla_hlo::SliceOp>(op) || isa<xla_hlo::ConcatenateOp>(op)) {
return false;
}
}