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

Function TEST

tensorflow/compiler/xla/shape_util_test.cc:35–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33using ::testing::ElementsAre;
34
35TEST(ShapeUtilTest, ShapeIndexViewTest) {
36 ShapeIndex index = {1, 2, 3, 4};
37 ShapeIndexView index_view(index, 1);
38 EXPECT_EQ(3, index_view.size());
39 EXPECT_EQ(ShapeIndexView({2, 3, 4}), index_view);
40 EXPECT_EQ(ShapeIndexView({3, 4}), index_view.ConsumeFront());
41 EXPECT_EQ(ShapeIndexView({2, 3}), index_view.ConsumeBack());
42}
43
44TEST(ShapeUtilTest, GetDimensionHelperCanNegativeIndex) {
45 Shape matrix = ShapeUtil::MakeShape(F32, {2, 3});

Callers

nothing calls this directly

Calls 15

ShapeIndexViewClass · 0.85
MakeShapeFunction · 0.85
CompatibleClass · 0.85
ByteSizeOfPrimitiveTypeFunction · 0.85
ForEachIndexFunction · 0.85
UnimplementedFunction · 0.85
TransposeIsBitcastFunction · 0.85
InversePermutationFunction · 0.85
ConsumeFrontMethod · 0.80
ConsumeBackMethod · 0.80
mutable_layoutMethod · 0.80
has_layoutMethod · 0.80

Tested by

no test coverage detected