Browse Source

fix(build): upgrade bazel riscv toolchains

GitOrigin-RevId: 8ac61cc4b6
release-1.10
Megvii Engine Team 3 years ago
parent
commit
a32b727720
2 changed files with 2 additions and 4 deletions
  1. +1
    -3
      dnn/src/common/cv/filter.cpp
  2. +1
    -1
      src/core/impl/tensor.cpp

+ 1
- 3
dnn/src/common/cv/filter.cpp View File

@@ -85,9 +85,7 @@ FilterEngine<ST, FT>::FilterEngine(
m_buf_step = 0;

//! the anchor must be in the kernerl
megdnn_assert(
0 <= m_anchor.x && m_anchor.x < m_ksize.cols() && 0 <= m_anchor.y &&
m_anchor.y < m_ksize.rows());
megdnn_assert(m_anchor.x < m_ksize.cols() && m_anchor.y < m_ksize.rows());

int src_elem_size = (int)sizeof(ST) * m_ch;
m_border_elem_size = src_elem_size / ((sizeof(ST) >= 4) ? sizeof(int) : 1);


+ 1
- 1
src/core/impl/tensor.cpp View File

@@ -494,7 +494,7 @@ DEF(reset, &)(TensorStorage storage, const TensorLayout& layout) {
if (span.last_elem == span.high_elem) {
mgb_assert(!layout.ndim || storage.valid_span(span) || storage.empty());
} else {
size_t start_pos = span.low_byte + static_cast<ptrdiff_t>(storage.offset());
int64_t start_pos = span.low_byte + static_cast<ptrdiff_t>(storage.offset());
bool enough_size = span.last_byte <= storage.size();
bool valid_size = storage.comp_node().valid() && start_pos >= 0 && enough_size;
mgb_assert(!layout.ndim || valid_size || storage.empty());


Loading…
Cancel
Save