MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / MakeDeviceAssn

Function MakeDeviceAssn

tensorflow/compiler/xla/tests/collective_ops_test.cc:152–159  ·  view source on GitHub ↗

Makes a DeviceAssignment assigning replica-id i to devices[i].

Source from the content-addressed store, hash-verified

150
151// Makes a DeviceAssignment assigning replica-id i to devices[i].
152DeviceAssignment MakeDeviceAssn(std::vector<int64> devices) {
153 DeviceAssignment assn(/*replica_count=*/devices.size(),
154 /*computation_count=*/1);
155 for (int64 i = 0; i < devices.size(); ++i) {
156 assn(i, 0) = devices[i];
157 }
158 return assn;
159}
160
161// Shorter alias for this function.
162absl::flat_hash_set<GlobalDeviceId> OpenNcclChannels() {

Callers 1

XLA_TEST_FFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected