提交 a0a4db16 编写于 作者: H hjchen2

Fix undefined symbol for ios arm v8

上级 f83c86f4
develop _release/v2.6.2 gh-pages github/fork/AnBaolei1984/baolei/bitmain github/fork/AnBaolei1984/bitmain github/fork/Cambricon/develop github/fork/DannyIsFunny/Android5 github/fork/DannyIsFunny/Update_MemOpt github/fork/DannyIsFunny/fix_pow github/fork/DannyIsFunny/fix_v26_windows github/fork/GaoWei8/reduce_sum github/fork/GaoWei8/reduce_sum_test_con github/fork/LDOUBLEV/ocr github/fork/Leonardo-Ding/dwh_dev github/fork/MaxwellDing/develop github/fork/MyPandaShaoxiang/fpga_patch github/fork/MyPandaShaoxiang/int8 github/fork/MyPandaShaoxiang/nlp_correct github/fork/MyPandaShaoxiang/opencl_valid github/fork/MyPandaShaoxiang/release/v2.3 github/fork/NHZlX/more_jeston_support github/fork/PaddleLite-EB/merge1.4 github/fork/PaddleLite-EB/new_dev github/fork/Wangzheee/matrix_nms_op github/fork/Xreki/step_rnn/opt_ddim_lite github/fork/cathwong/patch-1 github/fork/cclauss/patch-1 github/fork/chenjiaoAngel/cherry_pic github/fork/chenjiaoAngel/conv_dw_5x5 github/fork/chenjiaoAngel/conv_dw_5x5s2 github/fork/edimetia3d/arm_update_elementwise_op github/fork/edimetia3d/host_deformable_conv github/fork/edimetia3d/matrix_nms_host github/fork/edimetia3d/update_pow_op github/fork/edimetia3d/update_yolo_box github/fork/haozech/develop github/fork/haozech/infershape_chz github/fork/haozech/parl-develop github/fork/jackzhang235/develop github/fork/jameswu2014/develop github/fork/jiansowa/jiansowa/img_nna github/fork/jiweibo/stream_manage github/fork/juncaipeng/add_cast github/fork/lijianshe02/lite-x86 github/fork/qili93/update_sup_model_v26 github/fork/qjing666/develop github/fork/qnqinan/develop github/fork/qnqinan/track-develop github/fork/sangoly/python_compa github/fork/smilejames/develop github/fork/sunsetlh/sunsetlh/xpu_multi_test github/fork/wangqunbaidu/develop github/fork/weihaoji/whj_27 github/fork/weihaoji/xpu_res2net_fusion github/fork/weihaoji/xpu_weihaoji_dev github/fork/xiebaiyuan/fix_leak_opencl github/fork/xiebaiyuan/opencl_depthwised1 github/fork/xiebaiyuan/opencl_softmax github/fork/yanghongtian/yanghongtian/add_ascend310_target_place github/fork/yiicy/computelib github/fork/yongqiangma/bm_card github/fork/yongqiangma/calib github/fork/yongqiangma/copytocpu github/fork/yongqiangma/gpu github/fork/yongqiangma/pass github/fork/yongqiangma/pool github/fork/yongqiangma/priorbox github/fork/yongqiangma/shape github/fork/yongqiangma/split_c github/fork/yongqiangma/trans github/fork/yongqiangma/trans2 github/fork/yongqiangma/workspace github/fork/ysh329/add-cl-kernel-member-for-opencl github/fork/ysh329/add-get-output github/fork/ysh329/cherry-pick-precision-profiler-enhance github/fork/ysh329/fix-opencl-concat github/fork/ysh329/support-int64-copy-from-to-cpu github/fork/zhaoyang-star/enable_prifile_in_tiny_publish github/fork/zhaoyang-star/fix_openc_demo github/fork/zhaoyang-star/patch-1 github/fork/zhupengyang/opt release/v2.0.0 release/v2.0.0-beta1 release/v2.0.0-beta2 release/v2.0.0-rc release/v2.1.0 release/v2.2.0 release/v2.3 release/v2.6 release/v2.6.0 release/v2.7 revert-4368-hongming/test_v26 2.0.0-beta 1.5.0 v2.7-beta v2.6.3-beta2 v2.6.3-beta1 v2.6.2 v2.6.1 v2.6.0 v2.3.0 v2.2.0 v2.1.0 v2.0.0 v2.0.0-rc v2.0.0-beta1 v2.0.0-beta1-prerel release/1.4
5 合并请求!3489pull code,!3210[Opencl] fix opencl bug,!3154[arm]resize nnv12 bug,!3074[opencl]add grid_sampler op,!1337Fix undefined symbol for ios arm v8
......@@ -19,10 +19,12 @@ limitations under the License. */
#if defined(__ARM_NEON__) || defined(__ARM_NEON)
#include <arm_neon.h>
#endif
namespace paddle_mobile {
namespace operators {
#if defined(__ARM_NEON__) || defined(__ARM_NEON)
#ifndef __aarch64__
inline float32_t vmaxvq_f32(float32x4_t r) {
float32x2_t v = vmax_f32(vget_high_f32(r), vget_low_f32(r));
......
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#if defined(__ARM_NEON__) && defined(__aarch64__)
#include "operators/math/depthwise_conv3x3.h"
#ifdef __ARM_NEON__
#include <arm_neon.h>
#endif
namespace paddle_mobile {
namespace operators {
namespace math {
// template<>
// void DepthwiseConv3x3<int8_t, int32_t>(
// const framework::Tensor *input, const framework::Tensor *filter,
// const std::vector<int> &strides, framework::Tensor *output) {
// PADDLE_MOBILE_THROW_EXCEPTION(
// "Depthwise conv with generic strides has not been implemented.");
// }
template <>
void DepthwiseConv3x3S1<int8_t, int32_t>(const framework::Tensor &input,
const framework::Tensor &filter,
const std::vector<int> &paddings,
framework::Tensor *output) {
PADDLE_MOBILE_THROW_EXCEPTION(
"Depthwise conv3x3 with stride 1 for arm v8 has not been implemented.");
}
template <>
void DepthwiseConv3x3S2<int8_t, int32_t>(const framework::Tensor &input,
const framework::Tensor &filter,
const std::vector<int> &paddings,
framework::Tensor *output) {
PADDLE_MOBILE_THROW_EXCEPTION(
"Depthwise conv3x3 with stride 2 for arm v8 has not been implemented.");
}
} // namespace math
} // namespace operators
} // namespace paddle_mobile
#endif
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
// Inspired by https://arxiv.org/abs/1509.09308 and refered from nnpack and ncnn
// project.
#ifdef CONV_OP
#ifdef __aarch64__
#include "operators/math/pad.h"
#include "operators/math/winograd/winograd_transform.h"
namespace paddle_mobile {
namespace operators {
namespace math {
template <>
void winograd_transform_weight<8, 3>(const framework::Tensor &weight,
framework::Tensor *output) {
/*
* w0 = g0
* w1 = ((g0 + g2) + g1) * (-2.0 / 9)
* w2 = ((g0 + g2) - g1) * (-2.0 / 9)
* w3 = ((g0 + 4 * g2) + 2 * g1) * (1.0 / 90)
* w4 = ((g0 + 4 * g2) - 2 * g1) * (1.0 / 90)
* w5 = ((g2 + 4 * g0) + 2 * g1) * (1.0 / 180)
* w6 = ((g2 + 4 * g0) - 2 * g1) * (1.0 / 180)
* w7 = g2
*/
// TODO(hjchen2)
PADDLE_MOBILE_THROW_EXCEPTION(
"Winograd for arm v8 has not been implemented.");
}
template <>
void winograd_transform_input<8, 3>(const framework::Tensor &input,
framework::Tensor *output) {
/*
* x0 = (d0 - d6) + (d4 - d2) * 5.25
* x1 = (d2 + d6) - 4.25 * (d4 + d3) + (d1 + d5)
* x2 = (d2 + d6) - 4.25 * (d4 - d3) - (d1 + d5)
* x3 = (0.25 * d2 - 1.25 * d4 + d6) + (0.5 * d1 - 2.5 * d3 + 2 * d5)
* x4 = (0.25 * d2 - 1.25 * d4 + d6) - (0.5 * d1 - 2.5 * d3 + 2 * d5)
* x5 = (4 * d2 - 5 * d4 + d6) + (2 * d1 - 2.5 * d3 + 0.5 * d5)
* x6 = (4 * d2 - 5 * d4 + d6) - (2 * d1 - 2.5 * d3 + 0.5 * d5)
* x7 = (d7 - d1) + (d3 - d5) * 5.25
*/
// TODO(hjchen2)
PADDLE_MOBILE_THROW_EXCEPTION(
"Winograd for arm v8 has not been implemented.");
}
template <>
void winograd_transform_output<8, 3>(const framework::Tensor &input,
const framework::Tensor &weight,
framework::Tensor *output) {
// TODO(hjchen2)
PADDLE_MOBILE_THROW_EXCEPTION(
"Winograd for arm v8 has not been implemented.");
}
} // namespace math
} // namespace operators
} // namespace paddle_mobile
#endif // __aarch64__
#endif // CONV_OP
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册