This PR fixes a bug related to handling missing (implied) indices and adds the corresponding tests.
When scatter_dims_to_operand_dims size is not equal to the operand rank, the out_of_bound_tensor has incorrect dimensions, resulting in mismatched shapes of the select op. This is fixed at line 718.
When the update is not scalar, the indices are recalculated - this requires updating the out_of_bound_tensor (lines 757-761).
After expanding the indices, the has_scalar_indices flag has to be updated (line 777).
Also added a few cosmetic changes:
Removed is_one_dimensional branch in ExpandIndices, as this never happens (probably an artefact from prior implementation).
Broadcast the boundary constants instead of generating a (possibly big) literal.
This PR fixes a bug related to handling missing (implied) indices and adds the corresponding tests.
scatter_dims_to_operand_dims
size is not equal to the operand rank, theout_of_bound_tensor
has incorrect dimensions, resulting in mismatched shapes of the select op. This is fixed at line 718.out_of_bound_tensor
(lines 757-761).has_scalar_indices
flag has to be updated (line 777).Also added a few cosmetic changes:
is_one_dimensional
branch inExpandIndices
, as this never happens (probably an artefact from prior implementation).