Skip to content

Commit dfafb2e

Browse files
authored
Spec's scatter example has incorrect dimensions (#2876)
In scatter's example, the dimensions for `%update` don't match between the commented input and the MLIR. https://github.com/openxla/stablehlo/blob/96acdcb7724f4a9eec6d2e5af2597b0750c13948/docs/spec.md?plain=1#L5739-L5749 https://github.com/openxla/stablehlo/blob/96acdcb7724f4a9eec6d2e5af2597b0750c13948/docs/spec.md?plain=1#L5763 ```python >>> jnp.array([ ... [ ... [[1, 1], [1, 1], [1, 1]], ... [[1, 1], [1, 1], [1, 1]] ... ], ... [ ... [[1, 1], [1, 1], [1, 1]], ... [[1, 1], [1, 1], [1, 1]] ... ] ... ]).shape (2, 2, 3, 2) ```
1 parent 85fe3af commit dfafb2e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/spec.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5738,12 +5738,12 @@ undefined.
57385738
// ]
57395739
// %update: [
57405740
// [
5741-
// [[1, 1], [1, 1], [1, 1]],
5742-
// [[1, 1], [1, 1], [1, 1]]
5741+
// [[[1, 1], [1, 1]], [[1, 1], [1, 1]], [[1, 1], [1, 1]]],
5742+
// [[[1, 1], [1, 1]], [[1, 1], [1, 1]], [[1, 1], [1, 1]]]
57435743
// ],
57445744
// [
5745-
// [[1, 1], [1, 1], [1, 1]],
5746-
// [[1, 1], [1, 1], [1, 1]]
5745+
// [[[1, 1], [1, 1]], [[1, 1], [1, 1]], [[1, 1], [1, 1]]],
5746+
// [[[1, 1], [1, 1]], [[1, 1], [1, 1]], [[1, 1], [1, 1]]]
57475747
// ]
57485748
// ]
57495749
%result = "stablehlo.scatter"(%input, %scatter_indices, %update) ({

0 commit comments

Comments
 (0)