IREE Example Error

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鈥檛 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!

Hi! There are IREE-specific communication channels listed in our README here: GitHub - google/iree: 馃懟, for questions not as relevant to the broader MLIR community.

In this case, the iree/samples/ops/ folder is outdated and should probably be deleted. You鈥檒l have better chances with files under iree/iree/test/e2e at main 路 google/iree 路 GitHub, but note that you鈥檒l also need the -iree-input-type=mhlo flag for files like iree/dot.mlir at main 路 google/iree 路 GitHub.

EDIT: I deleted that folder in Delete iree/samples/ops/. by ScottTodd 路 Pull Request #8004 路 google/iree 路 GitHub

Thanks for the reminder! I will discuss questions about IREE on it.
I tried to use the example in iree/iree/test/e2e and it works. Thanks a lot!