diff --git a/docs/spec.md b/docs/spec.md index 149380dfacc..bdfe4df4d20 100644 --- a/docs/spec.md +++ b/docs/spec.md @@ -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. @@ -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 @@ -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 @@ -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, known_expanding_dimensions = array, - known_non_expanding_dimensions = array + known_nonexpanding_dimensions = array } : (tensor<1x3xi64>, tensor<3xi64>) -> tensor<2x3x2xi64> // %result: [ // [ diff --git a/stablehlo/dialect/StablehloOps.td b/stablehlo/dialect/StablehloOps.td index 8ee79201159..9d393fa1c43 100644 --- a/stablehlo/dialect/StablehloOps.td +++ b/stablehlo/dialect/StablehloOps.td @@ -2002,7 +2002,7 @@ def StableHLO_DynamicBroadcastInDimOp : StableHLO_ShapedInterfaceOp< %result = "stablehlo.dynamic_broadcast_in_dim"(%operand, %output_dimensions) { broadcast_dimensions = array, known_expanding_dimensions = array, - known_non_expanding_dimensions = array + known_nonexpanding_dimensions = array } : (tensor<1x3xi64>, tensor<3xi64>) -> tensor<2x3x2xi64> ``` diff --git a/stablehlo/tests/interpret/dynamic_broadcast_in_dim.mlir b/stablehlo/tests/interpret/dynamic_broadcast_in_dim.mlir index 95fa87f7330..206e0fbc92c 100644 --- a/stablehlo/tests/interpret/dynamic_broadcast_in_dim.mlir +++ b/stablehlo/tests/interpret/dynamic_broadcast_in_dim.mlir @@ -6,7 +6,7 @@ func.func @broadcast_in_dim() { %result = "stablehlo.dynamic_broadcast_in_dim"(%operand, %output_dimensions) { broadcast_dimensions = array, known_expanding_dimensions = array, - known_non_expanding_dimensions = array + known_nonexpanding_dimensions = array } : (tensor<3x1xi64>, tensor<3xi64>) -> tensor<3x2x2xi64> check.expect_eq_const %result, dense<[ [