Fix a bug where two replicated xla::ifrt::HloShardings with different numbers of devices were considered having the same partitioning
xla::HloSharding does not encode the number of devices for replicated sharding, so we must explicitly compare the device count. This new semantics is consistent with other implementations, e.g., ConcreteEvenSharding also compares the number of devices in addition to the global/shard shapes.
Fix a bug where two replicated
xla::ifrt::HloSharding
s with different numbers of devices were considered having the same partitioningxla::HloSharding
does not encode the number of devices for replicated sharding, so we must explicitly compare the device count. This new semantics is consistent with other implementations, e.g.,ConcreteEvenSharding
also compares the number of devices in addition to the global/shard shapes.