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

Function GetKernelInputArgDef

paddle/phi/api/lib/data_transform.h:76–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74};
75
76static inline phi::TensorArgDef GetKernelInputArgDef(
77 const phi::TensorArgDef& input_def, phi::Backend kernel_backend) {
78 phi::TensorArgDef input_actual_def = input_def;
79#ifdef PADDLE_WITH_CUSTOM_DEVICE
80 // When the backend of input tensor arg_def is CUSTOM, we need to set it to
81 // the actual backend by expected_kernel_key.
82 if (input_actual_def.backend == phi::Backend::CUSTOM) {
83 input_actual_def.SetBackend(kernel_backend);
84 }
85#endif
86 return input_actual_def;
87}
88
89std::shared_ptr<phi::DenseTensor> PrepareData(
90 const Tensor& input,

Callers 4

add_n_implFunction · 0.85
fused_gemm_epilogue_implFunction · 0.85
cudnn_lstm_grad_implFunction · 0.85
embedding_grad_implFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected