diff --git a/.gitattributes b/.gitattributes index 0f1dbf43efcb9ea81a3bf87fdb2d1eba0f122bc4..8f1c91f5901a8791f5365513a60ddae94aa810bd 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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/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/test_mge.mge filter=lfs diff=lfs merge=lfs -text diff --git a/src/serialization/impl/flatbuffers_helper.cpp b/src/serialization/impl/flatbuffers_helper.cpp index 85f92c8c719920061321311ae580d473d619ee27..d1de002b6647977bee290ca8ea88ac84db194021 100644 --- a/src/serialization/impl/flatbuffers_helper.cpp +++ b/src/serialization/impl/flatbuffers_helper.cpp @@ -67,6 +67,9 @@ megdnn::DType load_dtype(const fbs::DType* dtype) { return dtype::Quantized4Asymm{param->scale(), param->zero_point()}; case DTypeEnum::DTypeEnum_Quantized8Asymm: return dtype::Quantized8Asymm{param->scale(), param->zero_point()}; + default: + // Float16 may be disabled + megdnn_trap(); } return {}; } diff --git a/src/serialization/impl/serializer_oss.cpp b/src/serialization/impl/serializer_oss.cpp index d30d6971e6e40be64656aa03e1a4938d5bfbec87..b24302376e14af9554f426eb6e9e065d2301a3d2 100644 --- a/src/serialization/impl/serializer_oss.cpp +++ b/src/serialization/impl/serializer_oss.cpp @@ -638,12 +638,12 @@ void GraphLoaderOSS::OprLoadContextImpl::load_tensor_value( mgb_throw_if( consumed_size > data_size, SerializationError, "Custom tensor value loader consumed more data than " - "available: consumed %lu, has %u", + "available: consumed %zu, has %u", consumed_size, data_size); if (consumed_size < data_size) { mgb_log_warn( "Tensor value loader consumed less data than available: " - "consumed %lu bytes, has %u bytes", + "consumed %zu bytes, has %u bytes", consumed_size, data_size); file->skip(data_size - consumed_size); }