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

Function TEST

test/cpp/compat/ATen_empty_test.cc:36–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34// ======================== at::empty basic tests ========================
35
36TEST(ATenEmptyTest, BasicShape) {
37 at::Tensor t = at::empty({3, 4});
38 ASSERT_EQ(t.sizes()[0], 3);
39 ASSERT_EQ(t.sizes()[1], 4);
40}
41
42TEST(ATenEmptyTest, DtypeFloat) {
43 at::Tensor t = at::empty({2, 2}, at::TensorOptions().dtype(at::kFloat));

Callers

nothing calls this directly

Calls 15

TensorOptionsFunction · 0.85
empty_cudaFunction · 0.85
is_pinnedMethod · 0.80
is_cudaMethod · 0.80
emptyFunction · 0.50
is_availableFunction · 0.50
device_countFunction · 0.50
DeviceClass · 0.50
GetXPUDeviceCountFunction · 0.50
sizesMethod · 0.45
dtypeMethod · 0.45
scalar_typeMethod · 0.45

Tested by

no test coverage detected