Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
170
bool Tensor::is_cpu() const {
171
return place().GetType() == phi::AllocationType::CPU;
172
}
173
174
bool Tensor::is_gpu() const {
175
return place().GetType() == phi::AllocationType::GPU;
Callers
15
eager_api_async_read
Function · 0.45
eager_api_async_write
Function · 0.45
tensor_method_numpy
Function · 0.45
eager_method.cc
File · 0.45
ReluForward
Function · 0.45
ReluBackward
Function · 0.45
ReluForward
Function · 0.45
ReluBackward
Function · 0.45
main
Function · 0.45
TEST
Function · 0.45
TEST
Function · 0.45
TEST
Function · 0.45
Calls
2
place
Function · 0.50
GetType
Method · 0.45
Tested by
10
main
Function · 0.36
TEST
Function · 0.36
TEST
Function · 0.36
TEST
Function · 0.36
CheckOutputResult
Function · 0.36
TEST
Function · 0.36
TEST
Function · 0.36
TEST
Function · 0.36
TEST
Function · 0.36
TEST
Function · 0.36