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

Function TEST_F

tensorflow/compiler/xla/tools/hlo_module_loader_test.cc:27–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25class HloModuleLoaderTest : public HloTestBase {};
26
27TEST_F(HloModuleLoaderTest, StripsLogHeaders) {
28 const string& hlo_string = R"(
29I0521 12:04:45.883483 1509 service.cc:186] HloModule test_log_stripping
30I0521 12:04:45.883483 1509 service.cc:186]
31I0521 12:04:45.883483 1509 service.cc:186] ENTRY entry {
32I0521 12:04:45.883483 1509 service.cc:186] p0 = f32[4]{0} parameter(0)
33I0521 12:04:45.883483 1509 service.cc:186] p1 = f32[4]{0} parameter(1)
34I0521 12:04:45.883483 1509 service.cc:186] add = f32[4]{0} add(p0, p1)
35I0521 12:04:45.883483 1509 service.cc:186] ROOT rooty = (f32[4]{0}, f32[4]{0}) tuple(p1, add)
36I0521 12:04:45.883483 1509 service.cc:186] }
37)";
38
39 TF_ASSERT_OK_AND_ASSIGN(std::unique_ptr<HloModule> hlo_module,
40 LoadModuleFromData(hlo_string, "txt"));
41 EXPECT_NE(FindInstruction(hlo_module.get(), "p0"), nullptr);
42 EXPECT_NE(FindInstruction(hlo_module.get(), "p1"), nullptr);
43 EXPECT_NE(FindInstruction(hlo_module.get(), "add"), nullptr);
44 EXPECT_NE(FindInstruction(hlo_module.get(), "rooty"), nullptr);
45}
46
47} // namespace
48} // namespace xla

Callers

nothing calls this directly

Calls 4

LoadModuleFromDataFunction · 0.85
FindInstructionFunction · 0.85
TF_ASSERT_OK_AND_ASSIGNFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected