diff --git a/lite/kernels/apu/bridges/conv_op.cc b/lite/kernels/apu/bridges/conv_op.cc index bdac473b1b954a1dea38fa5d884863d863bc6b67..1c3020065ee4b16a56f95077b5906effd75a0249 100644 --- a/lite/kernels/apu/bridges/conv_op.cc +++ b/lite/kernels/apu/bridges/conv_op.cc @@ -60,9 +60,9 @@ int ConvConverter(void* ctx, OpLite* op, KernelBase* kernel) { CHECK_EQ(output_dims[0], bs); CHECK_EQ(output_dims[1], oc); auto strides = op_info->GetAttr>("strides"); - auto paddings = op_info->GetAttr>("paddings"); + std::vector paddings = op_info->GetAttr>("paddings"); auto groups = op_info->GetAttr("groups"); - auto dilations = op_info->GetAttr>("dilations"); + std::vector dilations = op_info->GetAttr>("dilations"); bool with_act = op_info->HasAttr("with_act") && op_info->GetAttr("with_act"); std::string act_type = diff --git a/lite/kernels/apu/bridges/pool_op.cc b/lite/kernels/apu/bridges/pool_op.cc index 594c7fabda61ff070c0e5349f5788798aaf12cf1..e2555180446920b670d98ebc3d82aa492ed244f4 100644 --- a/lite/kernels/apu/bridges/pool_op.cc +++ b/lite/kernels/apu/bridges/pool_op.cc @@ -45,7 +45,7 @@ int PoolConverter(void* ctx, OpLite* op, KernelBase* kernel) { auto pooling_type = op_info->GetAttr("pooling_type"); auto global_pooling = op_info->GetAttr("global_pooling"); auto ksize = op_info->GetAttr>("ksize"); - auto paddings = op_info->GetAttr>("paddings"); + std::vector paddings = op_info->GetAttr>("paddings"); // pool mode if ((pooling_type == "max") || (pooling_type == "avg")) { diff --git a/lite/kernels/npu/bridges/conv_op.cc b/lite/kernels/npu/bridges/conv_op.cc index 5cc79137b9f0e43e659dec745dcc8b98478807b6..95632c7a053aaccd9787456d27a0d71317b44d23 100644 --- a/lite/kernels/npu/bridges/conv_op.cc +++ b/lite/kernels/npu/bridges/conv_op.cc @@ -53,9 +53,9 @@ int ConvConverter(void* ctx, OpLite* op, KernelBase* kernel) { CHECK_EQ(output_dims[0], bs); CHECK_EQ(output_dims[1], oc); auto strides = op_info->GetAttr>("strides"); - auto paddings = op_info->GetAttr>("paddings"); + std::vector paddings = op_info->GetAttr>("paddings"); auto groups = op_info->GetAttr("groups"); - auto dilations = op_info->GetAttr>("dilations"); + std::vector dilations = op_info->GetAttr>("dilations"); bool with_act = op_info->HasAttr("with_act") && op_info->GetAttr("with_act"); std::string act_type = diff --git a/lite/kernels/npu/bridges/conv_transpose_op.cc b/lite/kernels/npu/bridges/conv_transpose_op.cc index 7e149ed24315b0a87a7e3e6ab4b1c4ad4bb2221a..52ae137d5239dfe3c005b646d99ace3873d5caf1 100644 --- a/lite/kernels/npu/bridges/conv_transpose_op.cc +++ b/lite/kernels/npu/bridges/conv_transpose_op.cc @@ -59,8 +59,8 @@ int ConvTransposeConverter(void* ctx, OpLite* op, KernelBase* kernel) { output_size = op_info->GetAttr>("output_size"); } - auto paddings = op_info->GetAttr>("paddings"); - auto dilations = op_info->GetAttr>("dilations"); + std::vector paddings = op_info->GetAttr>("paddings"); + std::vector dilations = op_info->GetAttr>("dilations"); CHECK_EQ(dilations.size(), 2L); std::string padding_algorithm = op_info->HasAttr("padding_algorithm") diff --git a/lite/kernels/npu/bridges/pad2d_op.cc b/lite/kernels/npu/bridges/pad2d_op.cc index 70fa87e778204845b90157fd9b468026aaaa2cbe..cb35b24752b82a23e7a7e426c4efac0d48977384 100644 --- a/lite/kernels/npu/bridges/pad2d_op.cc +++ b/lite/kernels/npu/bridges/pad2d_op.cc @@ -35,7 +35,7 @@ int Pad2dConverter(void* ctx, OpLite* op, KernelBase* kernel) { auto x = scope->FindMutableTensor(x_name); auto x_dims = x->dims(); auto out_name = op_info->Output("Out").front(); - auto padding = op_info->GetAttr>("paddings"); + std::vector padding = op_info->GetAttr>("paddings"); CHECK_EQ(padding.size(), 4); // X node diff --git a/lite/kernels/npu/bridges/pool_op.cc b/lite/kernels/npu/bridges/pool_op.cc index fc2647f67e2a94287c65bcb86dfcd730c81fa296..921e1a25719153a09621f98a8a025e8ae29a93ed 100644 --- a/lite/kernels/npu/bridges/pool_op.cc +++ b/lite/kernels/npu/bridges/pool_op.cc @@ -39,7 +39,7 @@ int PoolConverter(void* ctx, OpLite* op, KernelBase* kernel) { auto pooling_type = op_info->GetAttr("pooling_type"); auto global_pooling = op_info->GetAttr("global_pooling"); auto ksize = op_info->GetAttr>("ksize"); - auto paddings = op_info->GetAttr>("paddings"); + std::vector paddings = op_info->GetAttr>("paddings"); // X node std::shared_ptr x_node = nullptr; diff --git a/lite/kernels/npu/bridges/reduce_mean_op.cc b/lite/kernels/npu/bridges/reduce_mean_op.cc index 598734267244e36ba4ec32080313c4a7f134ed7b..a608082be06cfff55bb7451450b904a04c3c0c0d 100644 --- a/lite/kernels/npu/bridges/reduce_mean_op.cc +++ b/lite/kernels/npu/bridges/reduce_mean_op.cc @@ -36,7 +36,7 @@ int ReduceMeanConverter(void* ctx, OpLite* op, KernelBase* kernel) { auto x_dims = x->dims(); auto out_name = op_info->Input("Out").front(); auto keep_dim = op_info->GetAttr("keep_dim"); - auto dim = op_info->GetAttr>("dim"); + std::vector dim = op_info->GetAttr>("dim"); CHECK(!dim.empty()) << "[NPU] \"dim\" of reduce_mean should not be empty."; for (size_t i = 0; i < dim.size(); i++) { if (dim[i] < 0) { diff --git a/lite/kernels/rknpu/bridges/conv_op.cc b/lite/kernels/rknpu/bridges/conv_op.cc index 134d9e0cdeffbee5125007ff22f78b274a9f9ff7..a789f0bacc12bff2f08fc567b3d7f500c13e1da3 100644 --- a/lite/kernels/rknpu/bridges/conv_op.cc +++ b/lite/kernels/rknpu/bridges/conv_op.cc @@ -51,9 +51,9 @@ int ConvConverter(void* ctx, OpLite* op, KernelBase* kernel) { CHECK_EQ(output_dims[0], bs); CHECK_EQ(output_dims[1], oc); auto strides = op_info->GetAttr>("strides"); - auto paddings = op_info->GetAttr>("paddings"); + std::vector paddings = op_info->GetAttr>("paddings"); auto groups = op_info->GetAttr("groups"); - auto dilations = op_info->GetAttr>("dilations"); + std::vector dilations = op_info->GetAttr>("dilations"); auto fuse_relu = op_info->GetAttr("fuse_relu"); CHECK_EQ(strides.size(), 2L); CHECK_EQ(dilations.size(), 2L); diff --git a/lite/kernels/rknpu/bridges/pool_op.cc b/lite/kernels/rknpu/bridges/pool_op.cc index 36832fc578a3243145491112c674a1684748748e..1a5a69b1342c51f7a19e4e5ed6ffdc2e6c796c2a 100644 --- a/lite/kernels/rknpu/bridges/pool_op.cc +++ b/lite/kernels/rknpu/bridges/pool_op.cc @@ -42,7 +42,7 @@ int PoolConverter(void* ctx, OpLite* op, KernelBase* kernel) { auto pooling_type = op_info->GetAttr("pooling_type"); auto global_pooling = op_info->GetAttr("global_pooling"); auto ksize = op_info->GetAttr>("ksize"); - auto paddings = op_info->GetAttr>("paddings"); + std::vector paddings = op_info->GetAttr>("paddings"); // for quantization bool enable_int8 = false; diff --git a/lite/kernels/xpu/bridges/conv_op.cc b/lite/kernels/xpu/bridges/conv_op.cc index a4c0bc05cb4c6725739fb141f4b9e4ac1e93fe9c..590d830ce42a80262f7b097cae43d9b1efcd918c 100644 --- a/lite/kernels/xpu/bridges/conv_op.cc +++ b/lite/kernels/xpu/bridges/conv_op.cc @@ -44,9 +44,9 @@ int ConvConverter(void* ctx, OpLite* op, KernelBase* kernel) { CHECK_EQ(input_dims.size(), 4); CHECK_EQ(filter_dims.size(), 4); auto strides = op_info->GetAttr>("strides"); - auto paddings = op_info->GetAttr>("paddings"); + std::vector paddings = op_info->GetAttr>("paddings"); auto groups = op_info->GetAttr("groups"); - auto dilations = op_info->GetAttr>("dilations"); + std::vector dilations = op_info->GetAttr>("dilations"); auto fuse_relu = op_info->GetAttr("fuse_relu"); CHECK_EQ(strides.size(), 2L); CHECK_EQ(dilations.size(), 2L); diff --git a/lite/kernels/xpu/bridges/pool_op.cc b/lite/kernels/xpu/bridges/pool_op.cc index 862e1841e829833cfb76082cc050ea768e4ef9f0..5c38cacdddc8478e318e03e1d184349c32e67520 100644 --- a/lite/kernels/xpu/bridges/pool_op.cc +++ b/lite/kernels/xpu/bridges/pool_op.cc @@ -37,7 +37,7 @@ int PoolConverter(void* ctx, OpLite* op, KernelBase* kernel) { auto out_name = op_info->Output("Out").front(); auto pooling_type = op_info->GetAttr("pooling_type"); auto ceil_mode = op_info->GetAttr("ceil_mode"); - auto paddings = op_info->GetAttr>("paddings"); + std::vector paddings = op_info->GetAttr>("paddings"); auto global_pooling = op_info->GetAttr("global_pooling"); auto ksize = op_info->GetAttr>("ksize"); auto strides = op_info->GetAttr>("strides");