-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Description
What happened?
Some non-optional attributes have default values implemented in the parser (example), this makes for nonsense errors at verification time instead of parse time:
$ cat /tmp/t.mlir
func.func @gather(%arg0: tensor<3x4x2xf32>, %arg1: tensor<2x3x2xi64>) -> tensor<2x3x2x2xf32> {
%0 = "stablehlo.gather"(%arg0, %arg1) {
dimension_numbers = #stablehlo.gather<
offset_dims = [2, 3],
collapsed_slice_dims = [0],
start_index_map = [1, 0],
// index_vector_dim = 2
>,
slice_sizes = array<i64: 1, 2, 2>,
indices_are_sorted = false
} : (tensor<3x4x2xf32>, tensor<2x3x2xi64>) -> tensor<2x3x2x2xf32>
return %0 : tensor<2x3x2x2xf32>
}
$ stablehlo-opt /tmp/t.mlir
/tmp/t.mlir:2:8: error: 'stablehlo.gather' op inferred type(s) 'tensor<3x2x2x2xf32>' are incompatible with return type(s) of operation 'tensor<2x3x2x2xf32>'
Metadata
Metadata
Assignees
Labels
No labels