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

Function TEST

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

Test is_pinned for CPU tensor (should be false)

Source from the content-addressed store, hash-verified

34
35// Test is_pinned for CPU tensor (should be false)
36TEST(IsPinnedTest, CPUTensorNotPinned) {
37 auto tensor = at::arange(10, at::TensorOptions().dtype(at::kFloat));
38
39 EXPECT_FALSE(tensor.is_pinned());
40}
41
42// Test is_pinned for empty tensor
43TEST(IsPinnedTest, EmptyTensorNotPinned) {

Callers

nothing calls this directly

Calls 15

TensorOptionsFunction · 0.85
is_pinnedMethod · 0.80
reciprocalMethod · 0.80
copy_Method · 0.80
is_cudaMethod · 0.80
arangeFunction · 0.50
emptyFunction · 0.50
dtypeMethod · 0.45
dimMethod · 0.45
sizeMethod · 0.45
data_ptrMethod · 0.45
detachMethod · 0.45

Tested by

no test coverage detected