diff --git a/paddle/fluid/framework/details/op_registry.h b/paddle/fluid/framework/details/op_registry.h index ece0dc4e77b30735d3da8ea487a44d1f267d8155..3eb88ce84f8c300bb9e0b072c37e69ca4a7ed586 100644 --- a/paddle/fluid/framework/details/op_registry.h +++ b/paddle/fluid/framework/details/op_registry.h @@ -170,8 +170,8 @@ struct OpInfoFiller { platform::errors::AlreadyExists( "Duplicate InferShapeFN of %s has been registered", op_type)); - auto* op = - dynamic_cast(info->creator_("", {}, {}, {})); + OperatorWithKernel* op = dynamic_cast(info->creator_( + std::string{}, VariableNameMap{}, VariableNameMap{}, AttributeMap{})); PADDLE_ENFORCE_NOT_NULL(op, platform::errors::InvalidArgument( "%s should have kernels", op_type)); info->infer_shape_ = [op](InferShapeContext* ctx) { diff --git a/paddle/fluid/pybind/.gitignore b/paddle/fluid/pybind/.gitignore index 8f222791edb016df65be5db75831f5f83cf63726..d86562fe73c5748c4cf3e2fdffd0e0888f18ae2d 100644 --- a/paddle/fluid/pybind/.gitignore +++ b/paddle/fluid/pybind/.gitignore @@ -1 +1,2 @@ pybind.h +op_function_impl.h \ No newline at end of file