Remove no-longer-needed RequireDefaultOps().

Change: 115511835
This commit is contained in:
Josh Levenberg 2016-02-24 17:16:12 -08:00 committed by TensorFlower Gardener
parent ab286e0996
commit 9ba55d8a75
15 changed files with 2 additions and 15 deletions

View File

@ -48,7 +48,6 @@ Session* CreateSession() {
class DirectSessionMinusAXTest : public ::testing::Test {
public:
void Initialize(std::initializer_list<float> a_values) {
RequireDefaultOps();
Graph graph(OpRegistry::Global());
Tensor a_tensor(DT_FLOAT, TensorShape({2, 2}));

View File

@ -32,7 +32,6 @@ namespace {
class GpuStreamUtilTest : public OpsTestBase {
protected:
void SetUp() override { RequireDefaultOps(); }
};
TEST_F(GpuStreamUtilTest, BogusOpts) {

View File

@ -39,7 +39,6 @@ namespace test {
Benchmark::Benchmark(const string& device, Graph* g,
const SessionOptions* options, Graph* init) {
RequireDefaultOps();
SessionOptions default_options;
if (!options) {

View File

@ -146,7 +146,6 @@ REGISTER_KERNEL_BUILDER(Name("TestDeviceEnforce").Device(DEVICE_GPU), DummyOp);
class SimplePlacerTest : public ::testing::Test {
protected:
SimplePlacerTest() {
RequireDefaultOps();
// Build a set of 10 GPU and 10 CPU devices.
// NOTE: this->local_devices_ owns the device objects;
// this->devices_ contains borrowed pointers to the device

View File

@ -51,7 +51,6 @@ y: A scalar in type T.
static InstantiateAttrValueMap kNoAttrs;
TEST(TFunc, SquarePlusOne) {
RequireDefaultOps();
auto fdef = FDH::Define(
// Name
"SquarePlusOne",

View File

@ -37,7 +37,6 @@ class OpSegmentTest : public ::testing::Test {
std::vector<NodeDef> float_nodedefs_;
OpSegmentTest() : device_(Env::Default()) {
RequireDefaultOps();
for (int i = 0; i < 10; ++i) {
NodeDef def;
TF_CHECK_OK(NodeDefBuilder(strings::StrCat("op", i), "Mul")

View File

@ -70,7 +70,6 @@ bool ExpectBefore(const std::vector<std::pair<string, string>>& ordered_pairs,
}
TEST(AlgorithmTest, ReversePostOrder) {
RequireDefaultOps();
GraphDefBuilder b(GraphDefBuilder::kFailImmediately);
using namespace ::tensorflow::ops; // NOLINT(build/namespaces)
Node* w1 = SourceOp("TestParams", b.opts().WithName("W1"));

View File

@ -47,7 +47,6 @@ class EqualGraphDefTest : public ::testing::Test {
EqualGraphDefTest()
: e_(GraphDefBuilder::kFailImmediately),
a_(GraphDefBuilder::kFailImmediately) {
RequireDefaultOps();
}
bool Match() {

View File

@ -37,7 +37,6 @@ namespace {
class GraphConstructorTest : public ::testing::Test {
protected:
GraphConstructorTest() : g_(new Graph(OpRegistry::Global())) {
RequireDefaultOps();
}
~GraphConstructorTest() override {}

View File

@ -25,7 +25,6 @@ namespace tensorflow {
namespace {
TEST(GraphDefBuilderTest, Version) {
RequireDefaultOps();
// Verify that our assertions will be nontrivial
ASSERT_LT(0, TF_GRAPH_DEF_VERSION);

View File

@ -154,7 +154,6 @@ class GraphPartitionTest : public ::testing::Test {
builder_b_(GraphDefBuilder::kFailImmediately),
a_opts_(builder_a_.opts().WithDevice("/job:a/replica:0/task:0/cpu:0")),
b_opts_(builder_b_.opts().WithDevice("/job:a/replica:0/task:0/cpu:1")) {
RequireDefaultOps();
}
const GraphDef& ToGraphDef() {

View File

@ -32,7 +32,7 @@ namespace {
class GraphTest : public ::testing::Test {
protected:
GraphTest() : graph_(OpRegistry::Global()) { RequireDefaultOps(); }
GraphTest() : graph_(OpRegistry::Global()) {}
~GraphTest() override {}
static void VerifyNodes(Node* node, std::vector<Node*> expected_in,

View File

@ -28,7 +28,6 @@ REGISTER_OP("Source").Output("o: out_types").Attr("out_types: list(type)");
REGISTER_OP("Sink").Input("i: T").Attr("T: type");
TEST(NodeBuilderTest, Simple) {
RequireDefaultOps();
Graph graph(OpRegistry::Global());
Node* source_node;
TF_EXPECT_OK(NodeBuilder("source_op", "Source")

View File

@ -45,7 +45,7 @@ static void InitGraph(const string& s, Graph* graph) {
class OptimizerCSETest : public ::testing::Test {
public:
OptimizerCSETest() : graph_(OpRegistry::Global()) { RequireDefaultOps(); }
OptimizerCSETest() : graph_(OpRegistry::Global()) {}
void InitGraph(const string& s) {
::tensorflow::InitGraph(s, &graph_);

View File

@ -41,7 +41,6 @@ namespace {
class SubgraphTest : public ::testing::Test {
protected:
SubgraphTest() : g_(new Graph(OpRegistry::Global())) {
RequireDefaultOps();
device_info_.set_name("/job:a/replica:0/task:0/cpu:0");
device_info_.set_device_type(DeviceType(DEVICE_CPU).type());
device_info_.set_incarnation(0);