Browse Source

fix(build): fix riscv64 gcc build with > O0

GitOrigin-RevId: 9ad3480492
release-1.10
Megvii Engine Team 3 years ago
parent
commit
484e1f1173
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/gopt/impl/tensor_reformat.cpp

+ 2
- 2
src/gopt/impl/tensor_reformat.cpp View File

@@ -1534,12 +1534,12 @@ void EnableNchwxxPass::fill_opr_convert_fun(size_t pack_c_size) {
"The origin filter is not NCHW mode");
VarNodeArray temp_inp = new_inp;
//! if src is nchwxx, should RelayoutPlaceholder to nchw
if (temp_inp[0]->shape().ndim == 5) {
if (new_inp[0]->shape().ndim == 5) {
auto new_src = RelayoutPlaceholder::make(new_inp[0], src_to_nchw_mode);
temp_inp[0] = new_src.node();
}
//! the bias is nchwxx
if (new_inp.size() > 2 && temp_inp[2]->shape().ndim == 5) {
if (new_inp.size() > 2 && new_inp[2]->shape().ndim == 5) {
auto new_bias = RelayoutPlaceholder::make(new_inp[2], src_to_nchw_mode);
temp_inp[2] = new_bias.node();
}


Loading…
Cancel
Save