MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/compiler/jit/deadness_analysis_test.cc:228–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228TEST(DeadnessAnalysisTest, BasicPositive) {
229 Scope root = Scope::NewRootScope().ExitOnError();
230
231 ops::Switch sw = CreateSwitch(root, "0");
232 Output add =
233 ops::Add(root.WithOpName("add"), sw.output_true, sw.output_false);
234
235 std::unique_ptr<DeadnessAnalysis> result;
236 TF_ASSERT_OK(AnalyzeDeadness(root.graph(), &result));
237
238 TF_ASSERT_OK_AND_ASSIGN(
239 bool has_inputs_with_mismatching_deadness,
240 HasInputsWithMismatchingDeadness(*result, *add.node()));
241 EXPECT_TRUE(has_inputs_with_mismatching_deadness);
242}
243
244TEST(DeadnessAnalysisTest, BasicNegative) {
245 Scope root = Scope::NewRootScope().ExitOnError();

Callers

nothing calls this directly

Calls 15

CreateSwitchFunction · 0.85
AnalyzeDeadnessFunction · 0.85
ComputePredicatesFunction · 0.85
ControlOutputForFunction · 0.85
CreateInductionVariableFunction · 0.85
VLogGraphIfAskedFunction · 0.85
FixupSourceAndSinkEdgesFunction · 0.85
NextIterationFunction · 0.85
CreateSwitchNFunction · 0.85
ExitOnErrorMethod · 0.80

Tested by

no test coverage detected