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 { class DirectSessionMinusAXTest : public ::testing::Test {
public: public:
void Initialize(std::initializer_list<float> a_values) { void Initialize(std::initializer_list<float> a_values) {
RequireDefaultOps();
Graph graph(OpRegistry::Global()); Graph graph(OpRegistry::Global());
Tensor a_tensor(DT_FLOAT, TensorShape({2, 2})); Tensor a_tensor(DT_FLOAT, TensorShape({2, 2}));

View File

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

View File

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

View File

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

View File

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

View File

@ -37,7 +37,6 @@ class OpSegmentTest : public ::testing::Test {
std::vector<NodeDef> float_nodedefs_; std::vector<NodeDef> float_nodedefs_;
OpSegmentTest() : device_(Env::Default()) { OpSegmentTest() : device_(Env::Default()) {
RequireDefaultOps();
for (int i = 0; i < 10; ++i) { for (int i = 0; i < 10; ++i) {
NodeDef def; NodeDef def;
TF_CHECK_OK(NodeDefBuilder(strings::StrCat("op", i), "Mul") 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) { TEST(AlgorithmTest, ReversePostOrder) {
RequireDefaultOps();
GraphDefBuilder b(GraphDefBuilder::kFailImmediately); GraphDefBuilder b(GraphDefBuilder::kFailImmediately);
using namespace ::tensorflow::ops; // NOLINT(build/namespaces) using namespace ::tensorflow::ops; // NOLINT(build/namespaces)
Node* w1 = SourceOp("TestParams", b.opts().WithName("W1")); Node* w1 = SourceOp("TestParams", b.opts().WithName("W1"));

View File

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

View File

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

View File

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

View File

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

View File

@ -32,7 +32,7 @@ namespace {
class GraphTest : public ::testing::Test { class GraphTest : public ::testing::Test {
protected: protected:
GraphTest() : graph_(OpRegistry::Global()) { RequireDefaultOps(); } GraphTest() : graph_(OpRegistry::Global()) {}
~GraphTest() override {} ~GraphTest() override {}
static void VerifyNodes(Node* node, std::vector<Node*> expected_in, 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"); REGISTER_OP("Sink").Input("i: T").Attr("T: type");
TEST(NodeBuilderTest, Simple) { TEST(NodeBuilderTest, Simple) {
RequireDefaultOps();
Graph graph(OpRegistry::Global()); Graph graph(OpRegistry::Global());
Node* source_node; Node* source_node;
TF_EXPECT_OK(NodeBuilder("source_op", "Source") 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 { class OptimizerCSETest : public ::testing::Test {
public: public:
OptimizerCSETest() : graph_(OpRegistry::Global()) { RequireDefaultOps(); } OptimizerCSETest() : graph_(OpRegistry::Global()) {}
void InitGraph(const string& s) { void InitGraph(const string& s) {
::tensorflow::InitGraph(s, &graph_); ::tensorflow::InitGraph(s, &graph_);

View File

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