Hi,
I saw there are some discussions about IREE example on the forum, and I try to run IREE example here.
I run the iree/samples/ops/mhlo-dot.mlir
with command
iree-opt -iree-transformation-pipeline \
-iree-hal-target-backends=llvm-ir \
--print-ir-after-all -mlir-disable-threading \
-mlir-elide-elementsattrs-if-larger=8 iree/samples/ops/mhlo-dot.mlir
However, I couldn’t run it successfully, and here is my error message.
iree/samples/ops/mhlo-dot.mlir:2:8: error: 'mhlo.dot' op : illegal op still exists
%0 = "mhlo.dot"(%lhs, %rhs) : (tensor<32x1024xf32>, tensor<1024x64xf32>) -> tensor<32x64xf32>
^
iree/samples/ops/mhlo-dot.mlir:1:1: note: called from
func @dot(%lhs: tensor<32x1024xf32>, %rhs: tensor<1024x64xf32>) -> tensor<32x64xf32> {
^
iree/samples/ops/mhlo-dot.mlir:2:8: note: see current operation: %2 = "mhlo.dot"(%0, %1) : (tensor<32x1024xf32>, tensor<1024x64xf32>) -> tensor<32x64xf32>
%0 = "mhlo.dot"(%lhs, %rhs) : (tensor<32x1024xf32>, tensor<1024x64xf32>) -> tensor<32x64xf32>
^
iree/samples/ops/mhlo-dot.mlir:1:1: error: The following illegal operations still remain:
mhlo.dot (count: 1)
func @dot(%lhs: tensor<32x1024xf32>, %rhs: tensor<1024x64xf32>) -> tensor<32x64xf32> {
^
// -----// IR Dump After VerifyInputLegality Failed //----- //
"builtin.func"() ( {
^bb0(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view): // no predecessors
%0 = "hal.tensor.import"(%arg0) {target_encoding = tensor<32x1024xf32>} : (!hal.buffer_view) -> tensor<32x1024xf32>
%1 = "hal.tensor.import"(%arg1) {target_encoding = tensor<1024x64xf32>} : (!hal.buffer_view) -> tensor<1024x64xf32>
%2 = "mhlo.dot"(%0, %1) : (tensor<32x1024xf32>, tensor<1024x64xf32>) -> tensor<32x64xf32>
%3 = "hal.tensor.export"(%2) {source_encoding = tensor<32x64xf32>} : (tensor<32x64xf32>) -> !hal.buffer_view
"std.return"(%3) : (!hal.buffer_view) -> ()
}) {iree.abi.stub, sym_name = "dot", type = (!hal.buffer_view, !hal.buffer_view) -> !hal.buffer_view} : () -> ()
Did I misunderstand anything?
Thanks!