提交 66c18f60 编写于 作者: M Megvii Engine Team

fix(ci): fix bazel compile error in new macos

GitOrigin-RevId: d22cc87fec9d136c41ffb4a34bcb678875ab040e
上级 a88ecf47
...@@ -303,10 +303,8 @@ void channel_wise_nchw44_float::do_conv_kern_stride1_2x2( ...@@ -303,10 +303,8 @@ void channel_wise_nchw44_float::do_conv_kern_stride1_2x2(
float32x4_t kernel[4]; float32x4_t kernel[4];
load_vec<4>(kernel, filter); load_vec<4>(kernel, filter);
Op op; Op op;
float32x4_t init; float32x4_t init = vdupq_n_f32(0.f);
if (bias_mode == BiasMode::NO_BIAS) { if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vdupq_n_f32(0.f);
} else if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vld1q_f32(bias); init = vld1q_f32(bias);
} }
size_t oh_start = PH; size_t oh_start = PH;
...@@ -418,10 +416,8 @@ void channel_wise_nchw44_float::do_conv_kern_stride1_3x3( ...@@ -418,10 +416,8 @@ void channel_wise_nchw44_float::do_conv_kern_stride1_3x3(
float32x4_t kernel[9]; float32x4_t kernel[9];
load_vec<9>(kernel, filter); load_vec<9>(kernel, filter);
Op op; Op op;
float32x4_t init; float32x4_t init = vdupq_n_f32(0.f);
if (bias_mode == BiasMode::NO_BIAS) { if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vdupq_n_f32(0.f);
} else if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vld1q_f32(bias); init = vld1q_f32(bias);
} }
size_t oh_start = PH; size_t oh_start = PH;
...@@ -562,10 +558,8 @@ void channel_wise_nchw44_float::do_conv_kern_stride1_5x5( ...@@ -562,10 +558,8 @@ void channel_wise_nchw44_float::do_conv_kern_stride1_5x5(
const size_t IH, const size_t IW, const size_t OH, const size_t OW, const size_t IH, const size_t IW, const size_t OH, const size_t OW,
const size_t PH, const size_t PW) { const size_t PH, const size_t PW) {
Op op; Op op;
float32x4_t init; float32x4_t init = vdupq_n_f32(0.f);
if (bias_mode == BiasMode::NO_BIAS) { if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vdupq_n_f32(0.f);
} else if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vld1q_f32(bias); init = vld1q_f32(bias);
} }
size_t oh_start = PH; size_t oh_start = PH;
...@@ -723,10 +717,8 @@ void channel_wise_nchw44_float::do_conv_kern_stride2_2x2( ...@@ -723,10 +717,8 @@ void channel_wise_nchw44_float::do_conv_kern_stride2_2x2(
float32x4_t kernel[4]; float32x4_t kernel[4];
load_vec<4>(kernel, filter); load_vec<4>(kernel, filter);
Op op; Op op;
float32x4_t init; float32x4_t init = vdupq_n_f32(0.f);
if (bias_mode == BiasMode::NO_BIAS) { if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vdupq_n_f32(0.f);
} else if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vld1q_f32(bias); init = vld1q_f32(bias);
} }
size_t oh_start = (PH + 1) / 2; size_t oh_start = (PH + 1) / 2;
...@@ -789,10 +781,8 @@ void channel_wise_nchw44_float::do_conv_kern_stride2_3x3( ...@@ -789,10 +781,8 @@ void channel_wise_nchw44_float::do_conv_kern_stride2_3x3(
float32x4_t kernel[9]; float32x4_t kernel[9];
load_vec<9>(kernel, filter); load_vec<9>(kernel, filter);
Op op; Op op;
float32x4_t init; float32x4_t init = vdupq_n_f32(0.f);
if (bias_mode == BiasMode::NO_BIAS) { if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vdupq_n_f32(0.f);
} else if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vld1q_f32(bias); init = vld1q_f32(bias);
} }
size_t oh_start = (PH + 1) / 2; size_t oh_start = (PH + 1) / 2;
...@@ -914,10 +904,8 @@ void channel_wise_nchw44_float::do_conv_kern_stride2_5x5( ...@@ -914,10 +904,8 @@ void channel_wise_nchw44_float::do_conv_kern_stride2_5x5(
const size_t IH, const size_t IW, const size_t OH, const size_t OW, const size_t IH, const size_t IW, const size_t OH, const size_t OW,
const size_t PH, const size_t PW) { const size_t PH, const size_t PW) {
Op op; Op op;
float32x4_t init; float32x4_t init = vdupq_n_f32(0.f);
if (bias_mode == BiasMode::NO_BIAS) { if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vdupq_n_f32(0.f);
} else if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vld1q_f32(bias); init = vld1q_f32(bias);
} }
constexpr size_t stride = 2; constexpr size_t stride = 2;
......
...@@ -20,7 +20,7 @@ function try_install_brew() { ...@@ -20,7 +20,7 @@ function try_install_brew() {
} }
function install_brew_package() { function install_brew_package() {
BREW_PACKAGE="openssl readline sqlite3 xz gdbm zlib pyenv wget swig coreutils llvm git-lfs ninja" BREW_PACKAGE="openssl readline sqlite3 xz gdbm zlib pyenv wget swig coreutils llvm git-lfs ninja bzip2"
for pak in ${BREW_PACKAGE} for pak in ${BREW_PACKAGE}
do do
echo "###### do command: brew install ${pak}" echo "###### do command: brew install ${pak}"
...@@ -55,8 +55,19 @@ function install_python_package() { ...@@ -55,8 +55,19 @@ function install_python_package() {
if [ -e /Users/${USER}/.pyenv/versions/${pak} ];then if [ -e /Users/${USER}/.pyenv/versions/${pak} ];then
echo "FOUND install /Users/${USER}/.pyenv/versions/${pak} strip it..." echo "FOUND install /Users/${USER}/.pyenv/versions/${pak} strip it..."
else else
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install ${pak} os_ver=$(sw_vers -productVersion | awk '{print int($0)}')
if [ $a -lt 11 ];then
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install ${pak}
else
PYTHON_CONFIGURE_OPTS="--enable-shared" \
CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include \
-I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" \
LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" \
pyenv install --patch ${pak} < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)
fi
fi fi
echo "###### do command: /Users/${USER}/.pyenv/versions/${pak}/bin/python3 -m pip install --upgrade pip"
/Users/${USER}/.pyenv/versions/${pak}/bin/python3 -m pip install --upgrade pip
echo "###### do command: /Users/$USER/.pyenv/versions/${pak}/bin/python3 -m pip install -r ${SRC_DIR}/imperative/python/requires.txt" echo "###### do command: /Users/$USER/.pyenv/versions/${pak}/bin/python3 -m pip install -r ${SRC_DIR}/imperative/python/requires.txt"
/Users/$USER/.pyenv/versions/${pak}/bin/python3 -m pip install -r ${SRC_DIR}/imperative/python/requires.txt /Users/$USER/.pyenv/versions/${pak}/bin/python3 -m pip install -r ${SRC_DIR}/imperative/python/requires.txt
done done
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册