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

fix(build): upgrade bazel riscv toolchains

GitOrigin-RevId: 8ac61cc4b6f207dea4cc322efcaf8481ef5e583f
上级 588a645b
......@@ -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);
......
......@@ -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());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册