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

Class ShapeTest

tensorflow/compiler/xla/shape_test.cc:35–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33namespace {
34
35class ShapeTest : public ::testing::Test {
36 protected:
37 const Shape opaque_ = ShapeUtil::MakeOpaqueShape();
38 const Shape token_ = ShapeUtil::MakeTokenShape();
39 const Shape scalar_ = ShapeUtil::MakeShape(F32, {});
40 const Shape scalar_with_tile_ =
41 ShapeUtil::MakeShapeWithLayout(F32, {}, {}, {Tile({256})});
42 const Shape matrix_ = ShapeUtil::MakeShape(U32, {1, 2});
43 const Shape matrix2_ = ShapeUtil::MakeShapeWithLayout(S32, {3, 4}, {0, 1});
44 const Shape tuple_ =
45 ShapeUtil::MakeTupleShape({opaque_, scalar_, matrix_, matrix2_});
46 const Shape nested_tuple_ =
47 ShapeUtil::MakeTupleShape({tuple_, matrix_, token_});
48 const Shape dynamic_matrix_ =
49 ShapeUtil::MakeShape(S32, {5, 2}, {true, false});
50};
51
52TEST_F(ShapeTest, ShapeToFromProto) {
53 for (const Shape& shape : {opaque_, token_, scalar_, matrix_, matrix2_,

Callers

nothing calls this directly

Calls 2

MakeShapeFunction · 0.85
TileClass · 0.70

Tested by

no test coverage detected