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

Function XLA_TEST_P

tensorflow/compiler/xla/tests/select_and_scatter_test.cc:72–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70};
71
72XLA_TEST_P(SelectAndScatterTest, ParamTest) {
73 auto operand_shape = GetParam().operand_shape;
74 Array<float> o(operand_shape);
75 o.FillRandom(1.5f);
76 auto operand = ConstantFromArray(&builder_, o);
77
78 auto source_shape = GetParam().source_shape;
79 Array<float> s(source_shape);
80 s.FillRandom(12.0f);
81 auto source = ConstantFromArray(&builder_, s);
82
83 SelectAndScatter(operand, ge_f32_, GetParam().window_dimensions,
84 GetParam().window_strides, GetParam().padding_type, source,
85 ConstantR0<float>(&builder_, 0.0f), add_f32_);
86
87 ComputeAndCompare(&builder_, {}, ErrorSpec(1e-5, 1e-5));
88}
89
90INSTANTIATE_TEST_CASE_P(
91 SelectAndScatterTest_Instantiation, SelectAndScatterTest,

Callers

nothing calls this directly

Calls 5

GetParamFunction · 0.85
ConstantFromArrayFunction · 0.85
SelectAndScatterFunction · 0.85
ErrorSpecClass · 0.70
FillRandomMethod · 0.45

Tested by

no test coverage detected