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

Function TEST_F

tensorflow/compiler/tf2xla/xla_compiler_test.cc:180–190  ·  view source on GitHub ↗

Tests compilation and execution of an empty graph.

Source from the content-addressed store, hash-verified

178
179// Tests compilation and execution of an empty graph.
180TEST_F(XlaCompilerTest, EmptyReturnValues) {
181 XlaCompiler compiler(DefaultOptions());
182
183 std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
184 XlaCompiler::CompilationResult result;
185 TF_ASSERT_OK(compiler.CompileGraph(
186 XlaCompiler::CompileOptions(), "add", std::move(graph),
187 /*args=*/{}, /*user_aliases=*/{}, &result));
188
189 TF_ASSERT_OK(client_->Execute(*result.computation, {}).status());
190}
191
192// Tests compilation and execution of a graph that adds two tensors.
193TEST_F(XlaCompilerTest, Simple) {

Callers

nothing calls this directly

Calls 15

TensorShapeToXLAShapeFunction · 0.85
DummyReadResourceCCClass · 0.85
NodeDefBuilderClass · 0.85
XTimesTwoFunction · 0.85
BuildTestGraphFunction · 0.85
DataTypeToPrimitiveTypeFunction · 0.85
MakeShapeFunction · 0.85
CompatibleClass · 0.85
FixupSourceAndSinkEdgesFunction · 0.85
CompileGraphMethod · 0.80
ExitOnErrorMethod · 0.80

Tested by

no test coverage detected