From 4365f158955540886560afac31b044fca17cb50a Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Wed, 14 Jun 2023 16:58:30 +0800 Subject: [PATCH] fix(src/atlas): fixed that there should be no requirement for om model input format when using aipp GitOrigin-RevId: b19010ead2befbdc529b74bceff43dcbf3844d54 --- src/opr/impl/atlas_runtime_op.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/opr/impl/atlas_runtime_op.cpp b/src/opr/impl/atlas_runtime_op.cpp index 967bf2cdd..89ca0ba77 100644 --- a/src/opr/impl/atlas_runtime_op.cpp +++ b/src/opr/impl/atlas_runtime_op.cpp @@ -37,6 +37,7 @@ TensorShape acl_shape_to_mgb_shape_for_output(aclmdlIODims acl_shape, size_t bat TensorShape acl_shape_to_mgb_shape_for_input( aclmdlIODims acl_shape, size_t batch, bool enable_dynamic_batch, aclFormat om_format, AtlasRuntimeOpr::AippInputFormat aipp_input_fmt) { + MGB_MARK_USED_VAR(aipp_input_fmt); TensorShape ret; ret.ndim = acl_shape.dimCount; mgb_assert( @@ -60,11 +61,7 @@ TensorShape acl_shape_to_mgb_shape_for_input( ret[0], batch); } - if (aipp_input_fmt != AtlasRuntimeOpr::AippInputFormat::NO_AIPP) { - mgb_assert( - om_format == ACL_FORMAT_NHWC, - "om format should be NHWC if enable aipp"); - } + mgb_assert(om_format != ACL_FORMAT_UNDEFINED, "om input format should be defined"); return ret; } -- GitLab