Skip to content

Commit

Permalink
Fix constraints for TransposeOp (#1345)
Browse files Browse the repository at this point in the history
Fixes the type constraint (C3) of [transpose
op](https://github.com/openxla/stablehlo/blob/main/docs/spec.md#transpose).

fixes #1339. Please refer to
the same ticket for more details.

Note that the implementation of the (C3) is still correct
https://github.com/openxla/stablehlo/blob/076c6abc47edb53ed6510fec638112a4dc78ec33/stablehlo/dialect/TypeInference.cpp#L2898
  • Loading branch information
sdasgup3 committed Mar 22, 2023
1 parent 7e586e0 commit d2e64e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5296,7 +5296,7 @@ where `i[d] = j[permutation[d]]`.
* (C2) `permutation` is a permutation of `[0, 1, ..., R-1]` where `R` is the
rank of `operand`.
* (C3) For all dimensions `i` in `operand`, `dim(operand, i) = dim(result, j)`
where `j = permutation[i]`.
where `i = permutation[j]`.

#### Examples

Expand Down

0 comments on commit d2e64e4

Please sign in to comment.