Quantcast
Channel: Incubator - LLVM Discussion Forums
Viewing all articles
Browse latest Browse all 70

Tosa.reciprocal' op operand #0 must be tensor of number values, but got 'tensor'

$
0
0

Hello everyone. I seem to be having some problems lately and was hoping someone could give me some advice.
The thing is this. I’m using torch-mlir to convert models to MLIR, but I’m finding that it generates a lot of linalg.generic when the output type is LINALG_ON_TENSORS, which is actually not what I was expecting, I was hoping for something like linalg.matmul linalg.conv (because I want to run it on a customized gas pedal to facilitate me to write the related pass,linalg.generic is not easy to convert to a customized gas pedal), so my idea was to convert to tosa, but I ran into problems, I set the type of the output to TOSA.

error: "mambaforge/lib/python3.10/site-packages/transformers/models/bert/modeling_bert.py":349:0: 'tosa.reciprocal' op operand #0 must be tensor of number values, but got 'tensor<f64>'
note: "/mambaforge/lib/python3.10/site-packages/transformers/models/bert/modeling_bert.py":349:0: see current operation: %232 = "tosa. reciprocal"(%105) : (tensor<f64>) -> tensor<f64>

%232 = "tosa. reciprocal"(%105) : (tensor<f64>) -> tensor<f64> I don’t really see a problem.I don’t know how I should fix this. My thinking behind this is to use -tosa-to-linalg-named.
I hope someone can help me, thanks!

6 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 70

Trending Articles