MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / TEST

Function TEST

test/cpp/fluid/framework/tensor_test.cc:24–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace platform = paddle::platform;
23
24TEST(DenseTensor, Dims) {
25 phi::DenseTensor tt;
26 tt.Resize({2, 3, 4});
27 phi::DDim dims = tt.dims();
28 ASSERT_EQ(arity(dims), 3);
29 for (int i = 0; i < 3; ++i) {
30 EXPECT_EQ(i + 2, dims[i]);
31 }
32}
33
34TEST(DenseTensor, DataAssert) {
35 phi::DenseTensor src_tensor;

Callers

nothing calls this directly

Calls 15

arityFunction · 0.85
make_ddimFunction · 0.85
GPUPlaceClass · 0.85
ReshapeToMatrixFunction · 0.85
HolderMethod · 0.80
CPUPlaceClass · 0.50
ResizeMethod · 0.45
dimsMethod · 0.45
whatMethod · 0.45
findMethod · 0.45
getMethod · 0.45
SliceMethod · 0.45

Tested by

no test coverage detected