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

feat(build): bazel build support flatbuffer serialization

GitOrigin-RevId: 4755c27e06eeae005dbd17628cb79f0eacf8fa1d
上级 829f0907
...@@ -18,3 +18,4 @@ ci/resource/dump/roi_align_backward_8.8.0.mdl filter=lfs diff=lfs merge=lfs -tex ...@@ -18,3 +18,4 @@ ci/resource/dump/roi_align_backward_8.8.0.mdl filter=lfs diff=lfs merge=lfs -tex
ci/resource/dump/relayout_format_8.10.0.mdl filter=lfs diff=lfs merge=lfs -text ci/resource/dump/relayout_format_8.10.0.mdl filter=lfs diff=lfs merge=lfs -text
ci/resource/dump/batch_conv_bias_with_policy_8.8.0.mdl filter=lfs diff=lfs merge=lfs -text ci/resource/dump/batch_conv_bias_with_policy_8.8.0.mdl filter=lfs diff=lfs merge=lfs -text
ci/resource/prof/model_with_err_assert.mdl filter=lfs diff=lfs merge=lfs -text ci/resource/prof/model_with_err_assert.mdl filter=lfs diff=lfs merge=lfs -text
ci/resource/prof/test_mge.mge filter=lfs diff=lfs merge=lfs -text
...@@ -67,6 +67,9 @@ megdnn::DType load_dtype(const fbs::DType* dtype) { ...@@ -67,6 +67,9 @@ megdnn::DType load_dtype(const fbs::DType* dtype) {
return dtype::Quantized4Asymm{param->scale(), param->zero_point()}; return dtype::Quantized4Asymm{param->scale(), param->zero_point()};
case DTypeEnum::DTypeEnum_Quantized8Asymm: case DTypeEnum::DTypeEnum_Quantized8Asymm:
return dtype::Quantized8Asymm{param->scale(), param->zero_point()}; return dtype::Quantized8Asymm{param->scale(), param->zero_point()};
default:
// Float16 may be disabled
megdnn_trap();
} }
return {}; return {};
} }
......
...@@ -638,12 +638,12 @@ void GraphLoaderOSS::OprLoadContextImpl::load_tensor_value( ...@@ -638,12 +638,12 @@ void GraphLoaderOSS::OprLoadContextImpl::load_tensor_value(
mgb_throw_if( mgb_throw_if(
consumed_size > data_size, SerializationError, consumed_size > data_size, SerializationError,
"Custom tensor value loader consumed more data than " "Custom tensor value loader consumed more data than "
"available: consumed %lu, has %u", "available: consumed %zu, has %u",
consumed_size, data_size); consumed_size, data_size);
if (consumed_size < data_size) { if (consumed_size < data_size) {
mgb_log_warn( mgb_log_warn(
"Tensor value loader consumed less data than available: " "Tensor value loader consumed less data than available: "
"consumed %lu bytes, has %u bytes", "consumed %zu bytes, has %u bytes",
consumed_size, data_size); consumed_size, data_size);
file->skip(data_size - consumed_size); file->skip(data_size - consumed_size);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册