From 246f323497114119d1a37382d1c1ebf52c13ef43 Mon Sep 17 00:00:00 2001 From: yangyongqiang Date: Tue, 19 Nov 2024 13:35:20 +0000 Subject: [PATCH] =?UTF-8?q?!2882=20export=5Fcompile=5Fstat=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=8F=82=E7=B1=BB=E5=9E=8B=E5=88=A4=E6=96=AD?= =?UTF-8?q?=20Merge=20pull=20request=20!2882=20from=20yangyongqiang/ge=5Fd?= =?UTF-8?q?ev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tf_adapter/util/npu_attrs.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tf_adapter/util/npu_attrs.cc b/tf_adapter/util/npu_attrs.cc index 5e0725552..eead6faf3 100644 --- a/tf_adapter/util/npu_attrs.cc +++ b/tf_adapter/util/npu_attrs.cc @@ -2410,7 +2410,8 @@ Status NpuAttrs::SetNpuOptimizerAttr(const GraphOptimizationPassOptions &options if (params.count("variable_placement") > 0) { variable_location = params.at("variable_placement").s(); } - if (params.count("export_compile_stat") > 0) { + if ((params.count("export_compile_stat") > 0) && + (params.at("export_compile_stat").value_case() == AttrValue::ValueCase::kI)) { export_compile_stat = params.at("export_compile_stat").i(); const static std::vector kExportCompileStatList = {0, 1, 2}; NPU_REQUIRES_OK(CheckValueAllowed(export_compile_stat, kExportCompileStatList)); -- Gitee