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

Function XLA_TEST_F

tensorflow/compiler/xla/tests/conditional_test.cc:179–189  ·  view source on GitHub ↗

Test true and false computations that do not take any parameters.

Source from the content-addressed store, hash-verified

177
178// Test true and false computations that do not take any parameters.
179XLA_TEST_F(ConditionalOpTest, Parameters0) {
180 XlaBuilder builder(TestName());
181 XlaOp pred;
182 auto pred_arg = CreateR0Parameter<bool>(true, 0, "pred", &builder, &pred);
183 auto operands = Tuple(&builder, {});
184 auto true_computation = CreateR0ConstantComputation(56.0f);
185 auto false_computation = CreateR0ConstantComputation(12.0f);
186 Conditional(pred, operands, true_computation, operands, false_computation);
187
188 ComputeAndCompareR0<float>(&builder, 56.0f, {pred_arg.get()}, error_spec_);
189}
190
191// Test branch computations that do not take any parameters.
192XLA_TEST_P(CaseOpTest, Parameters0) {

Callers

nothing calls this directly

Calls 15

TestNameFunction · 0.85
MakeShapeFunction · 0.85
ConsumeValueOrDieMethod · 0.80
TupleFunction · 0.50
ConditionalFunction · 0.50
ParameterFunction · 0.50
CallFunction · 0.50
GetTupleElementFunction · 0.50
HasSubstrFunction · 0.50
LtClass · 0.50
GeClass · 0.50
getMethod · 0.45

Tested by

no test coverage detected