-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Closed
Labels
mlir:tosaquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
test commit: 9164d20
Description:
When applying tosa.rsqrt
to a tensor containing the value 0.0, the resulting value becomes inf
.
Steps to Reproduce:
Minimal MLIR program (test.mlir):
module {
func.func private @printMemrefF32(tensor<*xf32>)
func.func @main() -> () {
%arg0 = "tosa.const"() {values = dense<0.0> : tensor<1xf32>} : () -> tensor<1xf32>
%3 = tosa.rsqrt %arg0 : (tensor<1xf32>) -> tensor<1xf32>
%rtn1 = tensor.cast %3 : tensor<1xf32> to tensor<*xf32>
call @printMemrefF32(%rtn1) : (tensor<*xf32>) -> ()
return
}
}
Command:
mlir-opt test.mlir --tosa-to-linalg-pipeline --sparsifier | \
mlir-runner -e main -entry-point-result=void -shared-libs=/home/workdir/llvm-project/build/lib/libmlir_runner_utils.so
Output:
[inf]
Metadata
Metadata
Assignees
Labels
mlir:tosaquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!