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

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


  Branch: refs/heads/users/matthias-springer/improve_error_infer
  Home:   https://github.com/llvm/llvm-project
  Commit: a430578ea2daf965895c49d4f64f1fbee3da3a07
      https://github.com/llvm/llvm-project/commit/a430578ea2daf965895c49d4f64f1fbee3da3a07
  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/test/mlir-tblgen/op-decl-and-defs.td
    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