Skip to content

Commit 3bca370

Browse files
create SingleDeviceSharding when possible
Reverts c598dd8 PiperOrigin-RevId: 901012175
1 parent bf6c157 commit 3bca370

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

xla/python/pjrt_ifrt/pjrt_executable.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -214,16 +214,6 @@ std::vector<ShardingRef> MakeShardings(
214214
shardings.push_back(ifrt::HloSharding::Create(
215215
executable_devices, memory_kinds[i], (*hlo_shardings)[i]));
216216
}
217-
} else if (executable_devices->size() == 1 &&
218-
executable_devices->devices()[0]->IsAddressable()) {
219-
// Prefer SingleDeviceSharding over ConcreteEvenSharding, as it supports
220-
// more APIs, like IndexDomains(). The IsAddressable() check is to avoid
221-
// breaking test_jit_no_local_devices_single_device_sharding test case in
222-
// array_test.py
223-
for (int i = 0; i < memory_kinds.size(); ++i) {
224-
shardings.push_back(ifrt::SingleDeviceSharding::Create(
225-
executable_devices->devices()[0], memory_kinds[i]));
226-
}
227217
} else {
228218
// Assume a traditional replication computation where tile shapes are the
229219
// same as global shapes.

0 commit comments

Comments
 (0)