From fdb5e7c3eadf8cd5995e1ac84f69af4667b55f57 Mon Sep 17 00:00:00 2001 From: Anna R Date: Thu, 20 Dec 2018 15:01:11 -0800 Subject: [PATCH] Assert return value of InsertTfPlatformGpuIdPair in tensorflow/core/grappler/clusters:utils_test test. PiperOrigin-RevId: 226399061 --- tensorflow/core/grappler/clusters/utils_test.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tensorflow/core/grappler/clusters/utils_test.cc b/tensorflow/core/grappler/clusters/utils_test.cc index 3863d62980f..3cf72fd8170 100644 --- a/tensorflow/core/grappler/clusters/utils_test.cc +++ b/tensorflow/core/grappler/clusters/utils_test.cc @@ -17,6 +17,7 @@ limitations under the License. #include "tensorflow/core/common_runtime/gpu/gpu_id.h" #include "tensorflow/core/common_runtime/gpu/gpu_id_manager.h" +#include "tensorflow/core/lib/core/status_test_util.h" #include "tensorflow/core/platform/logging.h" #include "tensorflow/core/platform/test.h" #include "tensorflow/core/protobuf/device_properties.pb.h" @@ -82,12 +83,14 @@ TEST(UtilsTest, GetDeviceInfo) { #if GOOGLE_CUDA // Invalid platform GPU id. - GpuIdManager::InsertTfPlatformGpuIdPair(TfGpuId(0), PlatformGpuId(100)); + TF_ASSERT_OK( + GpuIdManager::InsertTfPlatformGpuIdPair(TfGpuId(0), PlatformGpuId(100))); properties = GetDeviceInfo(device); EXPECT_EQ("UNKNOWN", properties.type()); // Valid platform GPU id. - GpuIdManager::InsertTfPlatformGpuIdPair(TfGpuId(1), PlatformGpuId(0)); + TF_ASSERT_OK( + GpuIdManager::InsertTfPlatformGpuIdPair(TfGpuId(1), PlatformGpuId(0))); device.id = 1; properties = GetDeviceInfo(device); EXPECT_EQ("GPU", properties.type());