I generated my mlir code using this
resnet18 = models.resnet18(pretrained=True).eval()
module = fx.export_and_import(
resnet18,
torch.ones(1, 3, 224, 224),
output_type="tosa",
func_name=resnet18.__class__.__name__,
)
os.makedirs("./mlir_model", exist_ok=True)
with open("./mlir_model/test.mlir", "w") as f:
for i in module.body:
f.write(str(i))
I am trying to lower the tosa to llvm ir using these passes:
mlir-opt --tosa-to-linalg-pipeline test.mlir
but facing this error:
error: invalid properties {values = dense<0.000000e+00> : tensor<64xf32>} for op tosa.const: expected key entry for value in DictionaryAttr to set Properties.