8000 Added a sanity check · staticfloat/tensorflow@deb4382 · GitHub
[go: up one dir, main page]

Skip to content

Commit deb4382

Browse files
Added a sanity check
PiperOrigin-RevId: 155840396
1 parent 183e2c9 commit deb4382

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tensorflow/core/grappler/costs/virtual_placer.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ namespace tensorflow {
2525
namespace grappler {
2626

2727
VirtualPlacer::VirtualPlacer(const Cluster* cluster) : has_gpu_(false) {
28+
CHECK(cluster);
2829
devices_ = cluster->GetDevices();
29-
for (const auto& device : cluster->GetDevices()) {
30+
for (const auto& device : devices_) {
3031
if (str_util::Lowercase(device.first).find("gpu") != string::npos) {
3132
has_gpu_ = true;
3233
}

0 commit comments

Comments
 (0)
0