Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PaddlePaddle/Paddle
/ is_gpu
Method
is_gpu
paddle/phi/api/lib/tensor.cc:174–176 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
172
}
173
174
bool Tensor::is_gpu() const {
175
return place().GetType() == phi::AllocationType::GPU;
176
}
177
178
bool Tensor::is_gpu_pinned() const {
179
return place().GetType() == phi::AllocationType::GPUPINNED;
Callers
15
eager_api_async_read
Function · 0.80
eager_api_async_write
Function · 0.80
tensor_method_numpy
Function · 0.80
ReluForward
Function · 0.80
ReluBackward
Function · 0.80
ReluForward
Function · 0.80
ReluBackward
Function · 0.80
main
Function · 0.80
TEST
Function · 0.80
paddle_gap_forward
Function · 0.80
AddForward
Function · 0.80
AddBackward
Function · 0.80
Calls
2
place
Function · 0.50
GetType
Method · 0.45
Tested by
2
main
Function · 0.64
TEST
Function · 0.64