Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a constraint in
bitcast_convert
op (#1637)
As recommended in https://github.com/openxla/stablehlo/pull/1566/files/13a2c8b6e518d611fb7bd0747096392478291eef#r1237644676, the constraint in `bitcast_convert` is revised to make sure that the `num_bits(E) % num_bits(E') == 0` when `num_bits(E') < num_bits(E)` and `num_bits(E') % num_bits(E) == 0` when `num_bits(E) < num_bits(E')`. Note that this does not need a change in existing verification and testing as the the verifier for `bitcast_convert` is doing the exact [check](https://github.com/openxla/stablehlo/blob/d8f0c12e2a7541cfe6ba3a04c8a2fb350bdab43d/stablehlo/dialect/TypeInference.cpp#L3174) as proposed in the PR.
- Loading branch information