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

Function InitDefaultKernelSignatureMap

paddle/fluid/framework/phi_utils.cc:235–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233std::once_flag kernel_sig_map_init_flag;
234
235void InitDefaultKernelSignatureMap() {
236 std::call_once(kernel_sig_map_init_flag, [] {
237 for (const auto& pair : paddle::framework::OpInfoMap::Instance().map()) {
238 const auto& op_type = pair.first;
239 const auto* op_proto = pair.second.proto_;
240 if (phi::KernelFactory::Instance().HasCompatiblePhiKernel(op_type) &&
241 op_proto) {
242 paddle::framework::KernelArgsNameMakerByOpProto maker(op_proto);
243 VLOG(10) << "Register `" << op_type << "` kernel signature:";
244 phi::DefaultKernelSignatureMap::Instance().Insert(
245 op_type, maker.GetKernelSignature());
246 }
247 }
248 });
249}
250
251static void SetAllocationForUninitializedDenseTensor(
252 phi::DenseTensor* dense_tensor, const phi::Place& place) {

Callers 7

mainFunction · 0.85
PYBIND11_MODULEFunction · 0.85
operator()Method · 0.85
PrepareScopeMethod · 0.85
InitMethod · 0.85
InitKernelSignatureMapFunction · 0.85
TESTFunction · 0.85

Calls 4

InstanceFunction · 0.85
GetKernelSignatureMethod · 0.80
InsertMethod · 0.45

Tested by 2

mainFunction · 0.68
TESTFunction · 0.68