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

Function TEST

tensorflow/lite/delegates/gpu/gl/kernels/reshape_test.cc:98–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98TEST(Reshape, BatchIsUnsupported) {
99 TensorRef<BHWC> input;
100 input.type = DataType::FLOAT32;
101 input.ref = 0;
102 input.shape = BHWC(4, 1, 1, 1);
103
104 TensorRef<BHWC> output;
105 output.type = DataType::FLOAT32;
106 output.ref = 1;
107 output.shape = BHWC(1, 2, 2, 1);
108
109 ReshapeAttributes attr;
110 attr.new_shape = output.shape;
111
112 SingleOpModel model({ToString(OperationType::RESHAPE), attr}, {input},
113 {output});
114 ASSERT_TRUE(model.PopulateTensor(0, {1, 2, 3, 4}));
115 ASSERT_THAT(
116 model.Invoke(*NewReshapeNodeShader()).message(),
117 testing::HasSubstr("Only identical batch dimension is supported"));
118}
119
120} // namespace
121} // namespace gl

Callers 1

reshape_test.ccFile · 0.70

Calls 6

NewReshapeNodeShaderFunction · 0.85
ToStringFunction · 0.50
HasSubstrFunction · 0.50
PopulateTensorMethod · 0.45
messageMethod · 0.45
InvokeMethod · 0.45

Tested by

no test coverage detected