提交 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(
float32x4_t kernel[4];
load_vec<4>(kernel, filter);
Op op;
float32x4_t init;
if (bias_mode == BiasMode::NO_BIAS) {
init = vdupq_n_f32(0.f);
} else if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
float32x4_t init = vdupq_n_f32(0.f);
if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vld1q_f32(bias);
}
size_t oh_start = PH;
......@@ -418,10 +416,8 @@ void channel_wise_nchw44_float::do_conv_kern_stride1_3x3(
float32x4_t kernel[9];
load_vec<9>(kernel, filter);
Op op;
float32x4_t init;
if (bias_mode == BiasMode::NO_BIAS) {
init = vdupq_n_f32(0.f);
} else if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
float32x4_t init = vdupq_n_f32(0.f);
if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vld1q_f32(bias);
}
size_t oh_start = PH;
......@@ -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 PH, const size_t PW) {
Op op;
float32x4_t init;
if (bias_mode == BiasMode::NO_BIAS) {
init = vdupq_n_f32(0.f);
} else if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
float32x4_t init = vdupq_n_f32(0.f);
if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vld1q_f32(bias);
}
size_t oh_start = PH;
......@@ -723,10 +717,8 @@ void channel_wise_nchw44_float::do_conv_kern_stride2_2x2(
float32x4_t kernel[4];
load_vec<4>(kernel, filter);
Op op;
float32x4_t init;
if (bias_mode == BiasMode::NO_BIAS) {
init = vdupq_n_f32(0.f);
} else if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
float32x4_t init = vdupq_n_f32(0.f);
if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vld1q_f32(bias);
}
size_t oh_start = (PH + 1) / 2;
......@@ -789,10 +781,8 @@ void channel_wise_nchw44_float::do_conv_kern_stride2_3x3(
float32x4_t kernel[9];
load_vec<9>(kernel, filter);
Op op;
float32x4_t init;
if (bias_mode == BiasMode::NO_BIAS) {
init = vdupq_n_f32(0.f);
} else if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
float32x4_t init = vdupq_n_f32(0.f);
if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vld1q_f32(bias);
}
size_t oh_start = (PH + 1) / 2;
......@@ -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 PH, const size_t PW) {
Op op;
float32x4_t init;
if (bias_mode == BiasMode::NO_BIAS) {
init = vdupq_n_f32(0.f);
} else if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
float32x4_t init = vdupq_n_f32(0.f);
if (bias_mode == BiasMode::BROADCAST_CHANNEL_BIAS) {
init = vld1q_f32(bias);
}
constexpr size_t stride = 2;
......
......@@ -20,7 +20,7 @@ function try_install_brew() {
}
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}
do
echo "###### do command: brew install ${pak}"
......@@ -55,8 +55,19 @@ function install_python_package() {
if [ -e /Users/${USER}/.pyenv/versions/${pak} ];then
echo "FOUND install /Users/${USER}/.pyenv/versions/${pak} strip it..."
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
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"
/Users/$USER/.pyenv/versions/${pak}/bin/python3 -m pip install -r ${SRC_DIR}/imperative/python/requires.txt
done
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册