You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems mlir-opt --tosa-to-linalg-pipeline unconditionally uses the Basic Inference profile, and therefore only allows integer types.
The help-text for --tosa-to-linalg-pipeline says
The default pipeline for converting TOSA operators to the equivalent operations using the tensor operations in LinAlg as well as LinAlg named operations.
so I would have assumed it should be usable also for floating point tensors.
I could not find any tests using --tosa-to-linalg-pipeline except tests that are supposed to fail. Other tests seems build a stripped down version of --tosa-to-linalg-pipeline using explicit --pass-pipeline.
The symptom is:
$ cat ../bad_tosa.mlir
module attributes {llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", llvm.target_triple = "x86_64-unknown-linux-gnu"} {
func.func @main_graph() -> (tensor<1xf32>) {
%0 = "tosa.const"() <{value = dense<0.000000e+00> : tensor<1xf32>}> : () -> tensor<1xf32>
return %0 : tensor<1xf32>
}
}
$ build/bin/mlir-opt --tosa-to-linalg-pipeline ../bad_tosa.mlir
../bad_tosa.mlir:3:10: error: 'tosa.const' op is not profile-aligned: element type 'f32' is not legal
%0 = "tosa.const"() <{value = dense<0.000000e+00> : tensor<1xf32>}> : () -> tensor<1xf32>
^
../bad_tosa.mlir:3:10: note: see current operation: %0 = "tosa.const"() <{value = dense<0.000000e+00> : tensor<1xf32>}> : () -> tensor<1xf32>
../bad_tosa.mlir:4:5: error: 'func.return' op is not profile-aligned: element type 'f32' is not legal
return %0 : tensor<1xf32>
^
../bad_tosa.mlir:4:5: note: see current operation: "func.return"(%0) : (tensor<1xf32>) -> ()
It seems
mlir-opt --tosa-to-linalg-pipeline
unconditionally uses the Basic Inference profile, and therefore only allows integer types.The help-text for
--tosa-to-linalg-pipeline
saysso I would have assumed it should be usable also for floating point tensors.
I could not find any tests using
--tosa-to-linalg-pipeline
except tests that are supposed to fail. Other tests seems build a stripped down version of--tosa-to-linalg-pipeline
using explicit--pass-pipeline
.The symptom is:
Commit 2bcbe40.
I have attached a full transcript.
bad_tosa.txt
The text was updated successfully, but these errors were encountered: