diff --git a/paddle/framework/op_desc.cc b/paddle/framework/op_desc.cc index 6ce453cc994c7168978709b3d4c3165bf7a2b99d..c4dcb2210d13d71e924ce9e0dfcae0715914476f 100644 --- a/paddle/framework/op_desc.cc +++ b/paddle/framework/op_desc.cc @@ -200,6 +200,7 @@ static InferShapeFuncMap &InferShapeFuncs() { // all registered kernels for (auto &pair : OperatorWithKernel::AllOpKernels()) { auto &info = info_map.Get(pair.first); + // use empty type here to avoid runtime checks. auto op = static_cast(info.Creator()("", {}, {}, {})); g_map->insert(