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

Function GetDeviceContextByBackend

paddle/phi/api/lib/kernel_dispatch.cc:130–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128namespace paddle::experimental {
129
130phi::DeviceContext* GetDeviceContextByBackend(phi::Backend backend) {
131 auto& pool = paddle::experimental::DeviceContextPool::Instance();
132 return pool.GetMutable(phi::TransToPhiPlace(backend));
133}
134
135DataType ParseDataType(DataType dtype) { return dtype; }
136DataType ParseDataType(const Tensor& tensor) { return tensor.type(); }

Callers 7

set_xpu_debug_levelFunction · 0.85
add_n_implFunction · 0.85
fused_gemm_epilogue_implFunction · 0.85
cudnn_lstm_grad_implFunction · 0.85
embedding_grad_implFunction · 0.85
scale_kernel_contextFunction · 0.85
scale_switch_caseFunction · 0.85

Calls 3

InstanceFunction · 0.85
TransToPhiPlaceFunction · 0.85
GetMutableMethod · 0.45

Tested by

no test coverage detected