未验证 提交 c6a68ba6 编写于 作者: Z zhupengyang 提交者: GitHub

register arm kernel cast, fill_constant, fill_constant_batch_size_like to kAny (#3076)

上级 606d6b5a
......@@ -73,7 +73,7 @@ void CastCompute::Run() {
} // namespace paddle
REGISTER_LITE_KERNEL(
cast, kARM, kFloat, kNCHW, paddle::lite::kernels::arm::CastCompute, def)
cast, kARM, kAny, kNCHW, paddle::lite::kernels::arm::CastCompute, def)
.BindInput("X", {LiteType::GetTensorTy(TARGET(kARM), PRECISION(kAny))})
.BindOutput("Out", {LiteType::GetTensorTy(TARGET(kARM), PRECISION(kAny))})
.Finalize();
......@@ -23,7 +23,7 @@ namespace lite {
namespace kernels {
namespace arm {
class CastCompute : public KernelLite<TARGET(kARM), PRECISION(kFloat)> {
class CastCompute : public KernelLite<TARGET(kARM), PRECISION(kAny)> {
public:
using param_t = operators::CastParam;
......
......@@ -52,7 +52,7 @@ void FillConstantBatchSizeLikeCompute::Run() {
REGISTER_LITE_KERNEL(
fill_constant_batch_size_like,
kARM,
kFloat,
kAny,
kNCHW,
paddle::lite::kernels::arm::FillConstantBatchSizeLikeCompute,
def)
......
......@@ -22,7 +22,7 @@ namespace kernels {
namespace arm {
class FillConstantBatchSizeLikeCompute
: public KernelLite<TARGET(kARM), PRECISION(kFloat)> {
: public KernelLite<TARGET(kARM), PRECISION(kAny)> {
public:
using param_t = operators::FillConstantBatchSizeLikeParam;
......
......@@ -52,7 +52,7 @@ void FillConstantCompute::Run() {
// float
REGISTER_LITE_KERNEL(fill_constant,
kARM,
kFloat,
kAny,
kNCHW,
paddle::lite::kernels::arm::FillConstantCompute,
def)
......
......@@ -21,7 +21,7 @@ namespace lite {
namespace kernels {
namespace arm {
class FillConstantCompute : public KernelLite<TARGET(kARM), PRECISION(kFloat)> {
class FillConstantCompute : public KernelLite<TARGET(kARM), PRECISION(kAny)> {
public:
using param_t = operators::FillConstantParam;
......
......@@ -163,7 +163,7 @@ TEST(Cast, precision) {
Place place;
float abs_error = 2e-5;
#if defined(LITE_WITH_ARM)
place = TARGET(kARM);
place = {TARGET(kARM), PRECISION(kAny)};
#elif defined(LITE_WITH_XPU)
place = TARGET(kXPU);
#else
......
......@@ -138,7 +138,7 @@ TEST(fill_constant_batch_size_like, precision) {
place = TARGET(kNPU);
abs_error = 1e-2; // use fp16 in npu
#elif defined(LITE_WITH_ARM)
place = TARGET(kARM);
place = {TARGET(kARM), PRECISION(kAny)};
#else
return;
#endif
......
......@@ -175,7 +175,7 @@ TEST(fill_constant, precision) {
place = TARGET(kNPU);
abs_error = 1e-2; // use fp16 in npu
#elif defined(LITE_WITH_ARM)
place = TARGET(kARM);
place = {TARGET(kARM), PRECISION(kAny)};
#else
return;
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册