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

Function XLA_TEST_P

tensorflow/compiler/xla/tests/conv_depthwise_test.cc:86–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84
85
86XLA_TEST_P(DepthwiseConvolution2DTest, DoIt) {
87 const DepthwiseConvolution2DSpec& spec = ::testing::get<0>(GetParam());
88 bool use_bfloat16 = ::testing::get<1>(GetParam());
89
90#ifdef XLA_BACKEND_DOES_NOT_SUPPORT_BFLOAT16
91 if (use_bfloat16) {
92 return;
93 }
94#endif
95
96 const string hlo_text =
97 BuildHloTextDepthwiseConvolution2D(spec, use_bfloat16);
98
99 EXPECT_TRUE(RunAndCompare(hlo_text, ErrorSpec{0.01, 0.01},
100 [](HloModule* module) -> Status {
101 BFloat16MixedPrecisionRemoval remover;
102 TF_RETURN_IF_ERROR(remover.Run(module).status());
103 Despecializer despecializer;
104 return despecializer.Run(module).status();
105 }));
106}
107
108INSTANTIATE_TEST_CASE_P(
109 DepthwiseConvolution2DTestWithRandomIndices, DepthwiseConvolution2DTest,

Callers

nothing calls this directly

Calls 5

GetParamFunction · 0.85
RunAndCompareFunction · 0.85
statusMethod · 0.45
RunMethod · 0.45

Tested by

no test coverage detected