-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Getting following error:
small.mlir:5:10: error: failed to legalize operation 'torch.operator' that was explicitly marked illegal
%2 = torch.operator "onnx.Greater"(%arg1, %1) : (!torch.vtensor<[?],si64>, !torch.vtensor<[?,1],si64>) -> !torch.vtensor<[?,?],i1>
^
/wrk/xhdhdnobkup3/vagrawal/scratch/AIGShark/nodai/SharkTestSuite_vivekag/SHARK-TestSuite/alt_e2eshark/test-run/hf_TinyLlama-1.1B-Chat-v1.0/model.torch_onnx.small.mlir:5:10: note: see current operation: %23 = "torch.operator"(%arg1, %22) <{name = "onnx.Greater"}> : (!torch.vtensor<[?],si64>, !torch.vtensor<[?,1],si64>) -> !torch.vtensor<[?,?],i1>
Steps to reproduce:
iree-compile small.mlir --iree-hal-target-backends=llvm-cpu --iree-llvmcpu-target-cpu=host -o compiled_model.vmfb
small.mlir:
module {
func.func @main_graph(%arg0: !torch.vtensor<[?],si64>, %arg1: !torch.vtensor<[?],si64>) -> !torch.vtensor<[?,?],i1> attributes {torch.onnx_meta.ir_version = 7 : si64, torch.onnx_meta.opset_version = 14 : si64, torch.onnx_meta.producer_name = "pytorch", torch.onnx_meta.producer_version = "2.7.0"} {
%0 = torch.operator "onnx.Constant"() {torch.onnx.value = dense_resource<__model_Constant_8_attr__value> : tensor<2xsi64>} : () -> !torch.vtensor<[2],si64>
%1 = torch.operator "onnx.Reshape"(%arg0, %0) {torch.onnx.allowzero = 0 : si64} : (!torch.vtensor<[?],si64>, !torch.vtensor<[2],si64>) -> !torch.vtensor<[?,1],si64>
%2 = torch.operator "onnx.Greater"(%arg1, %1) : (!torch.vtensor<[?],si64>, !torch.vtensor<[?,1],si64>) -> !torch.vtensor<[?,?],i1>
return %2 : !torch.vtensor<[?,?],i1>
}
}
Metadata
Metadata
Assignees
Labels
No labels