You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was brought up from the discussions on the OpenXLA side. Consider adding support for it in StableHLO as supported endianness for bitcast_convert is currently implementation defined.
The text was updated successfully, but these errors were encountered:
Here are the following constraints:
```
(I1) operand is a tensor.
(C1) Let `E` and `E'` be the `operand` and `result` element type,
respectively and `R = rank(operand)`:
* If `num_bits(E')` = `num_bits(E)`, shape(`result`) = shape(`operand`).
* If `num_bits(E')` < `num_bits(E)`:
* `rank(result) = R+1`.
* dim(`result`, `i`) = dim(`operand`, `i`) for all `i` in [0, `R`-1].
* `dim(result, R) = num_bits(E)/num_bits(E')`.
* If `num_bits(E')` > `num_bits(E)`:
* `rank(result) = R-1`.
* dim(`result`, `i`) = dim(`operand`, `i`) for all `i` in [0, `R`-1).
* `dim(operand, R-1) = num_bits(E')/num_bits(E)`.
(C2) Conversion between complex and non-complex types is not permitted.
```
These constraints will be comprehensively covered by the following
tests:
```
I1: a) operand is not a tensor. (Covered by ODS).
C1: a) If `num_bits(E')` = `num_bits(E)`, shape(`result`) != shape(`operand`).
C1: b) If `num_bits(E')` < `num_bits(E)`: `rank(result) != R+1`.
C1: c) If `num_bits(E')` < `num_bits(E)`: dim(`result`, `i`) != dim(`operand`, `i`) for any `i` in [0, `R`-1].
C1: d) If `num_bits(E')` < `num_bits(E)`: `dim(result, R) != num_bits(E)/num_bits(E')`.
C1: e) If `num_bits(E')` > `num_bits(E)`: `rank(result) != R-1`.
C1: f) If `num_bits(E')` > `num_bits(E)`: dim(`result`, `i`) != dim(`operand`, `i`) for all `i` in [0, `R`-1).
C1: g) If `num_bits(E')` > `num_bits(E)`: `dim(operand, R-1) != num_bits(E')/num_bits(E)`.
(C2) Conversion between complex and non-complex types is permitted.
```
If we drop the "Covered by ODS" pieces, this will leave us with the
following test cases:
```
C1a: If `num_bits(E')` = `num_bits(E)`:
shape(`result`) != shape(`operand`).
C1b: If `num_bits(E')` < `num_bits(E)`:
`rank(result) != R+1`.
C1c: If `num_bits(E')` < `num_bits(E)`:
dim(`result`, `i`) != dim(`operand`, `i`) for any `i` in [0, `R`-1].
C1d: If `num_bits(E')` < `num_bits(E)`:
`dim(result, R) != num_bits(E)/num_bits(E')`.
C1e: If `num_bits(E')` > `num_bits(E)`:
`rank(result) != R-1`.
C1f: If `num_bits(E')` > `num_bits(E)`:
dim(`result`, `i`) != dim(`operand`, `i`) for all `i` in [0, `R`-1).
C1g: If `num_bits(E')` > `num_bits(E)`:
`dim(operand, R-1) != num_bits(E')/num_bits(E)`.
C2: Conversion between complex and non-complex types is permitted.
```
Notes:
* The interpreter assumes little endian representation, and we have
#1460 to address adding support for big endian architectures.
closes#1098
This was brought up from the discussions on the OpenXLA side. Consider adding support for it in StableHLO as supported endianness for
bitcast_convert
is currently implementation defined.The text was updated successfully, but these errors were encountered: