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

Function TEST_P

tensorflow/compiler/xla/tests/concat_test.cc:535–550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

533};
534
535TEST_P(ConcatR2BinaryTest, DoIt) {
536 const R2BinarySpec& spec = GetParam();
537 Array2D<int32> lhs(spec.lhs_dim0, spec.lhs_dim1);
538 lhs.FillUnique();
539 Array2D<int32> rhs(spec.rhs_dim0, spec.rhs_dim1);
540 rhs.FillUnique(1000);
541
542 XlaBuilder builder(TestName());
543 auto a0 = ConstantR2FromArray2D<int32>(&builder, lhs);
544 auto a1 = ConstantR2FromArray2D<int32>(&builder, rhs);
545 ConcatInDim(&builder, {a0, a1}, spec.concat_dimension);
546
547 std::unique_ptr<Array2D<int32>> expected =
548 ReferenceUtil::Concat2D(lhs, rhs, spec.concat_dimension);
549 ComputeAndCompareR2<int32>(&builder, *expected, {});
550}
551
552// Regression test for b/31944287. x*y is used (at the same index) by all
553// operands of the concat. We should emit x*y in three incoming basic blocks of

Callers

nothing calls this directly

Calls 4

GetParamFunction · 0.85
TestNameFunction · 0.85
ConcatInDimFunction · 0.85
FillUniqueMethod · 0.80

Tested by

no test coverage detected