catalyst
catalyst copied to clipboard
Can we remove assertion that indices are unique and sorted for scatter ops?
Context: PR for testing purposes. Can we remove the assertion that indices are unique and sorted for scatter ops? I've added tests that qjit compile jnp.bincount, which, when lowered, call stablehlo.scatter with indices_are_sorted = false and unique_indices = false.
Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues:
Is there any action item here?
Is there any action item here?
Not right now, I don't think these asserts are blocking anyone at the moment. But I'm happy to keep this PR open in case it becomes useful in the future and we're confident it's safe.
Just for some context, I asked here https://github.com/orgs/openxla/discussions/129 but there is still no answer. I again think that our lowering since it is sequential and unoptimized is probably the safest approach, but yes, we do need time to reason about this operation's semantics.