Skip to content

Commit 7a73692

Browse files
authored
normalized custom operator impl (#32666)
1 parent 10c493a commit 7a73692

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paddle/fluid/framework/custom_operator.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ class CustomOperator : public OperatorWithKernel {
246246
* it can only be determined at runtime.
247247
*/
248248
framework::OpKernelType GetExpectedKernelType(
249-
const framework::ExecutionContext& ctx) const {
249+
const framework::ExecutionContext& ctx) const override {
250250
return framework::OpKernelType(proto::VarType::RAW, ctx.GetPlace());
251251
}
252252

@@ -257,7 +257,7 @@ class CustomOperator : public OperatorWithKernel {
257257
*/
258258
framework::OpKernelType GetKernelTypeForVar(
259259
const std::string& var_name, const Tensor& tensor,
260-
const OpKernelType& expected_kernel_type) {
260+
const OpKernelType& expected_kernel_type) const override {
261261
return OpKernelType(expected_kernel_type.data_type_,
262262
expected_kernel_type.place_, tensor.layout());
263263
}

0 commit comments

Comments
 (0)