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

Method is_cpu

paddle/phi/api/lib/tensor.cc:170–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170bool Tensor::is_cpu() const {
171 return place().GetType() == phi::AllocationType::CPU;
172}
173
174bool Tensor::is_gpu() const {
175 return place().GetType() == phi::AllocationType::GPU;

Callers 15

eager_api_async_readFunction · 0.45
eager_api_async_writeFunction · 0.45
tensor_method_numpyFunction · 0.45
eager_method.ccFile · 0.45
ReluForwardFunction · 0.45
ReluBackwardFunction · 0.45
ReluForwardFunction · 0.45
ReluBackwardFunction · 0.45
mainFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45

Calls 2

placeFunction · 0.50
GetTypeMethod · 0.45

Tested by 10

mainFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
CheckOutputResultFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36