From c732c831b988e621c7f600a5fe15321fe0e3a359 Mon Sep 17 00:00:00 2001 From: Jiabin Yang Date: Fri, 10 Dec 2021 11:48:40 +0800 Subject: [PATCH] support pylayer with different input dtype (#37974) --- paddle/fluid/operators/py_layer_op.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/operators/py_layer_op.h b/paddle/fluid/operators/py_layer_op.h index d80faab90b2..6625a4a1a75 100644 --- a/paddle/fluid/operators/py_layer_op.h +++ b/paddle/fluid/operators/py_layer_op.h @@ -54,7 +54,7 @@ class PyLayerOp : public framework::OperatorWithKernel { protected: framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext& ctx) const override { - auto data_type = OperatorWithKernel::IndicateVarDataType(ctx, "X"); + auto data_type = paddle::framework::proto::VarType::Type::VarType_Type_FP32; return framework::OpKernelType(data_type, ctx.device_context()); } -- GitLab