Skip to content

Commit 1ece5ab

Browse files
zhangyujingtensorflower-gardener
authored andcommitted
Expose underlying devices of a ParallelDevice.
PiperOrigin-RevId: 367449422 Change-Id: I4bd604e9574ada803e9e549c2d99c56713719e54
1 parent 35202fa commit 1ece5ab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tensorflow/c/eager/parallel_device/parallel_device_lib.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ class ParallelDevice {
8181
// The number of devices operations run on.
8282
size_t num_underlying_devices() const { return underlying_devices_.size(); }
8383

84+
// The devices operations run on.
85+
const std::vector<std::string>& underlying_devices() const {
86+
return underlying_devices_;
87+
}
88+
8489
// Takes a description of a single operation being executed on the
8590
// ParallelDevice, and in turn runs one operation per component device with
8691
// its corresponding inputs from the input ParallelTensors. Wraps the

0 commit comments

Comments
 (0)