Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo: known_non_expanding_dimensions -> known_nonexpanding_dimensions #2540

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -2733,7 +2733,7 @@ This operation is functionally identical to
[broadcast_in_dim](https://github.com/openxla/stablehlo/blob/main/docs/spec.md#broadcast_in_dim)
op, but the result shape is specified dynamically via `output_dimensions`.

The operation also accepts optional attributes `known_expanding_dimensions`, `known_non_expanding_dimensions`
The operation also accepts optional attributes `known_expanding_dimensions`, `known_nonexpanding_dimensions`
to express static knowledge about the expanding behavior of dimensions.
If not specified, all dimensions are assumed to be possibly expanding.

Expand All @@ -2745,7 +2745,7 @@ If not specified, all dimensions are assumed to be possibly expanding.
| (I2) | `output_dimensions` | 1-dimensional tensor of integer type | (C7) |
| (I3) | `broadcast_dimensions` | 1-dimensional constant tensor of integer type | (C2-C6) |
| (I4) | `known_expanding_dimensions` | 1-dimensional constant tensor of integer type | (C8-C9) |
| (I5) | `known_non_expanding_dimensions` | 1-dimensional constant tensor of integer type | (C8-C9) |
| (I5) | `known_nonexpanding_dimensions` | 1-dimensional constant tensor of integer type | (C8-C9) |

#### Outputs

Expand Down Expand Up @@ -2774,9 +2774,9 @@ If not specified, all dimensions are assumed to be possibly expanding.
zero_points(operand)[0] for i in
range(dim(result, quantization_dimension(result)))`.
* (C7) `size(output_dimensions) = rank(result)`.
* (C8) `is_unique(known_expanding_dimensions + known_non_expanding_dimensions)`.
* (C8) `is_unique(known_expanding_dimensions + known_nonexpanding_dimensions)`.
* (C9) `0 <= known_expanding_dimensions < rank(operand)`.
* (C10) `0 <= known_non_expanding_dimensions < rank(operand)`.
* (C10) `0 <= known_nonexpanding_dimensions < rank(operand)`.

#### Examples

Expand All @@ -2789,7 +2789,7 @@ If not specified, all dimensions are assumed to be possibly expanding.
%result = "stablehlo.dynamic_broadcast_in_dim"(%operand, %output_dimensions) {
broadcast_dimensions = array<i64: 2, 1>,
known_expanding_dimensions = array<i64: 0>,
known_non_expanding_dimensions = array<i64: 1>
known_nonexpanding_dimensions = array<i64: 1>
} : (tensor<1x3xi64>, tensor<3xi64>) -> tensor<2x3x2xi64>
// %result: [
// [
Expand Down
2 changes: 1 addition & 1 deletion stablehlo/dialect/StablehloOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -2002,7 +2002,7 @@ def StableHLO_DynamicBroadcastInDimOp : StableHLO_ShapedInterfaceOp<
%result = "stablehlo.dynamic_broadcast_in_dim"(%operand, %output_dimensions) {
broadcast_dimensions = array<i64: 2, 1>,
known_expanding_dimensions = array<i64: 0>,
known_non_expanding_dimensions = array<i64: 1>
known_nonexpanding_dimensions = array<i64: 1>
} : (tensor<1x3xi64>, tensor<3xi64>) -> tensor<2x3x2xi64>
```

Expand Down
2 changes: 1 addition & 1 deletion stablehlo/tests/interpret/dynamic_broadcast_in_dim.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ func.func @broadcast_in_dim() {
%result = "stablehlo.dynamic_broadcast_in_dim"(%operand, %output_dimensions) {
broadcast_dimensions = array<i64: 0, 2>,
known_expanding_dimensions = array<i64: 1>,
known_non_expanding_dimensions = array<i64: 0>
known_nonexpanding_dimensions = array<i64: 0>
} : (tensor<3x1xi64>, tensor<3xi64>) -> tensor<3x2x2xi64>
check.expect_eq_const %result, dense<[
[
Expand Down
Loading