From c62ddba238f7297158c7d2dd4e7a1a3e944f8dde Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Fri, 1 Apr 2022 14:55:05 +0800 Subject: [PATCH] feat(dnn/opencl): optimize heuristic rule GitOrigin-RevId: 971c93d926c774f574d75a1ee8e1e37a4295d9c0 --- dnn/src/common/tensor_format.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dnn/src/common/tensor_format.cpp b/dnn/src/common/tensor_format.cpp index 314d9507c..9bb6abf84 100644 --- a/dnn/src/common/tensor_format.cpp +++ b/dnn/src/common/tensor_format.cpp @@ -261,7 +261,9 @@ void Image2DPackedTensorFormatBase::assert_valid( layout.shape[layout.ndim - 1]); megdnn_assert( layout.dtype.valid() && !layout.dtype.is_quantized_lowbit() && - layout.ndim > m_align_axis); + layout.ndim > m_align_axis, + "dtype=%s ndim=%zu align=%zu is_quantized_lowbit=%d", layout.dtype.name(), + layout.ndim, m_align_axis, layout.dtype.is_quantized_lowbit()); ptrdiff_t first_non_zero_stride = 0; for (int i = layout.ndim - 1; i >= 0; --i) { megdnn_assert(layout.shape[i]); -- GitLab