[all-commits] [llvm/llvm-project] 6e402a: [mlir][IR] Improve error message when return type ...

Matthias Springer via All-commits all-commits at lists.llvm.org
Tue Oct 15 02:18:20 PDT 2024


  Branch: refs/heads/users/matthias-springer/improve_error_infer
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e402a09552e6b8d17561a8a0e0705e065b43168
      https://github.com/llvm/llvm-project/commit/6e402a09552e6b8d17561a8a0e0705e065b43168
  Author: Matthias Springer <mspringer at nvidia.com>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

  Changed paths:
    M mlir/include/mlir/Interfaces/InferTypeOpInterface.h
    M mlir/lib/Interfaces/InferTypeOpInterface.cpp
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  [mlir][IR] Improve error message when return type could not be inferred

Print an error such as the following one before terminating program execution.
```
mlir/test/Dialect/SparseTensor/convert_dense2sparse.mlir:26:8: remark: location of new op
  %0 = sparse_tensor.convert %arg0 : tensor<?xi32> to tensor<?xi32, #SparseVector>
       ^
LLVM ERROR: Failed to infer result type(s):
"sparse_tensor.positions"(...) {} : (index) -> ( ??? )

(stack trace follows)
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list