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

Function XLA_TEST_F

tensorflow/compiler/xla/tests/dot_operation_test.cc:68–85  ·  view source on GitHub ↗

Check that we can safely pass an input tuple's elements to a dot operation.

Source from the content-addressed store, hash-verified

66
67// Check that we can safely pass an input tuple's elements to a dot operation.
68XLA_TEST_F(DotOperationTest, DotOfInputTupleElem) {
69 XlaBuilder builder(TestName());
70
71 XlaOp param;
72 auto param_data = CreateParameterAndTransferLiteral(
73 0,
74 LiteralUtil::MakeTupleFromSlices(
75 {LiteralUtil::CreateR2<float>({{1, 2}, {3, 4}}),
76 LiteralUtil::CreateR2<float>({{5, 6}, {7, 8}})}),
77 "arg0", &builder, &param);
78 auto lhs = GetTupleElement(param, 0);
79 auto rhs = GetTupleElement(param, 1);
80 Dot(lhs, rhs);
81
82 ComputeAndCompareLiteral(&builder,
83 LiteralUtil::CreateR2<float>({{19, 22}, {43, 50}}),
84 {param_data.get()});
85}
86
87template <typename T>
88class DotOperationTest_F16F32F64CF64 : public DotOperationTest {};

Callers

nothing calls this directly

Calls 15

TestNameFunction · 0.85
MakeShapeFunction · 0.85
ConstantR2FromArray2DFunction · 0.85
DynamicSliceFunction · 0.85
DotGeneralFunction · 0.85
RunAndCompareFunction · 0.85
ConstantR3FromArray3DFunction · 0.85
ConsumeValueOrDieMethod · 0.80
FillIotaMethod · 0.80
GetTupleElementFunction · 0.50
DotFunction · 0.50

Tested by

no test coverage detected