Benign repos Download

dynamic_device_mgr_test.cc

imports tensorflow/core/platform/notification.himports tensorflow/core/platform/status.h
SHA-256512caa478b7d42724b20d773b684723a3e9b6f70b37a1d3c32a85eaf5be42fe9

Evidence

apache web server name lines 1–10
1/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is …
imports tensorflow/core/platform/notification.h lines 11–33
11:42… IND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15
16#include <memory>
17#include <vector>
18
19#include "absl/memory/memory.h"
20#include "absl/synchronization/notification.h"
21#include "tensorflow/core/common_runtime/device_mgr.h"
22#include "tensorflow/core/framework/device_attributes.pb.h"
23#include "tensorflow/core/lib/core/status.h"
24#include "tensorflow/core/lib/strings/strcat.h"
25#include "tensorflow/core/platform/notification.h"
26#include "tensorflow/core/platform/status.h"
27#include "tensorflow/core/platform/test.h"
28
29namespace tensorflow {
⋯4 lines
C/C++ unit-test EXPECT_EQ marker lines 68–74
68:58… :CPU:0"));
69
70 auto dm = std::make_unique<DynamicDeviceMgr>();
71 EXPECT_EQ(dm->ListDevices().size(), 0);
72
73 std::vector<std::unique_ptr<Device>> added_devices;
74 added_devices.emplace_back(std::move(d0) …
English function-word token "that" lines 77–79
77:7… CT_EQ(dm->ListDevices().size(), 2);
78 // Checks that list is sorted by the device name order, not insertion order.
79 // Insertion order is flipped a …
C/C++ unit-test EXPECT_TRUE marker lines 162–168
162:45…
163 absl::Status s = dm->AddDevices(std::move(added_devices));
164 EXPECT_TRUE(
165 absl::StrContains(s.message(), "name conflicts with an existing device"));
166}
167
168TEST(DynamicDeviceMgrTest, RemoveNonExisti …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.