diff --git a/tf_adapter/kernels/geop_npu.cc b/tf_adapter/kernels/geop_npu.cc index a655033f97b5eec761aa1d938a7debc70b27ea7a..0dd5197bd10c838e17a61df5b9d9d70d43ed2fca 100644 --- a/tf_adapter/kernels/geop_npu.cc +++ b/tf_adapter/kernels/geop_npu.cc @@ -439,8 +439,6 @@ void GeOp::Initialize(OpKernelConstruction *ctx) { ADP_LOG(INFO) << "[GEOP] GePlugin init success."; } ADP_LOG(INFO) << "init options: "; - NpuAttrs::LogOptions(init_options_); - if (is_aoe_) { handle_ = mmDlopen("libaoe_tuning.so", MMPA_RTLD_NOW); OP_REQUIRES(ctx, handle_ != nullptr, errors::InvalidArgument("libaoe_tuning.so dlopen failed, ", mmDlerror())); @@ -489,8 +487,6 @@ void GeOp::Initialize(OpKernelConstruction *ctx) { } sess_options_ = NpuAttrs::GetSessOptions(ctx); - ADP_LOG(INFO) << "session options: "; - NpuAttrs::LogOptions(sess_options_); input_shapes_vec_.resize(ctx->num_inputs() + 1, absl::nullopt); @@ -1263,6 +1259,8 @@ void GeOp::ComputeAsync(OpKernelContext *ctx, DoneCallback done) { graph_options["ge.exec.graphIOMemAllocMode"] = "ByGE"; OP_REQUIRES_OK_ASYNC(ctx, CreateGeSession(), done); auto const graph_option_ascend_string = ChangeStringToAscendString(graph_options); + ADP_LOG(INFO) << "Graph options: "; + NpuAttrs::LogOptions(graph_options); auto status = ge_session_->AddGraph(cache_graph_id, ge_graph, graph_option_ascend_string); std::stringstream ss; if (status != ge::SUCCESS) { diff --git a/tf_adapter/kernels/npu_sys_ctl_ops.cc b/tf_adapter/kernels/npu_sys_ctl_ops.cc index a247dc5de60b4a0c14519fe5f430a6fec980ae40..759b6ffaacda2221c192a25b3b748517b36037ad 100644 --- a/tf_adapter/kernels/npu_sys_ctl_ops.cc +++ b/tf_adapter/kernels/npu_sys_ctl_ops.cc @@ -78,9 +78,8 @@ NPUInit::NPUInit(OpKernelConstruction *ctx) : OpKernel(ctx) { ADP_LOG(INFO) << "[NPUInit] NPUInit can not get _NpuOptimizer attr, use default init options"; init_options_ = NpuAttrs::GetDefaultInitOptions(); } - ADP_LOG(INFO) << "init option:"; - NpuAttrs::LogOptions(init_options_); } + void NPUInit::Compute(OpKernelContext *ctx) { (void) ctx; if (GePlugin::GetInstance()->IsGlobal()) { diff --git a/tf_adapter/optimizers/om_partition_subgraphs_pass.cc b/tf_adapter/optimizers/om_partition_subgraphs_pass.cc index 32e85aa0923320da4e929772bdaca2ccf83e0a8c..631402ddce0857b38216bcab34e87d9a0c3e7b75 100644 --- a/tf_adapter/optimizers/om_partition_subgraphs_pass.cc +++ b/tf_adapter/optimizers/om_partition_subgraphs_pass.cc @@ -2106,8 +2106,6 @@ Status OMPartitionSubgraphsPass::ProcessGraph(std::unique_ptr *graph, Fun break; } } - ADP_LOG(INFO) << "All options:"; - NpuAttrs::LogOptions(all_options); std::string job = pass_options["job"]; if (job == "ps" || job == "default") { diff --git a/tf_adapter/util/ge_plugin.cc b/tf_adapter/util/ge_plugin.cc index faedc0bdc048cc88eea6c70b87f190d09bdd0720..d8f5966183dc3db2ff147f9846544b90799df790 100644 --- a/tf_adapter/util/ge_plugin.cc +++ b/tf_adapter/util/ge_plugin.cc @@ -151,6 +151,8 @@ void GePlugin::Init(std::map &init_options, const bool ADP_LOG(INFO) << "[GePlugin] Ge has already initialized"; return; } + ADP_LOG(INFO) << "Init options: "; + NpuAttrs::LogOptions(init_options); init_options_ = init_options; std::string enable_hf32_execution; diff --git a/tf_adapter/util/host_queue.cc b/tf_adapter/util/host_queue.cc index 1919783a04cc6597c6676a8ed47dc88ef7abf39e..7a9db2563e834f68eeb33de82a2dff08f04d3b94 100644 --- a/tf_adapter/util/host_queue.cc +++ b/tf_adapter/util/host_queue.cc @@ -251,7 +251,6 @@ Status HostQueueSetTransId(const uint32_t queue_id, void *&buff) { Status HostQueueInit(const std::string &name, const uint32_t &depth, uint32_t &queue_id) { std::map init_options = NpuAttrs::GetInitOptions(); - NpuAttrs::LogOptions(init_options); GePlugin::GetInstance()->Init(init_options, false); NPU_REQUIRES(name.size() + 1 <= RT_MQ_MAX_NAME_LEN, diff --git a/tf_adapter/util/npu_attrs.cc b/tf_adapter/util/npu_attrs.cc index f4fedf99ec288a4f29e4d2982e63b4f9d64db777..099abf40c4d05c479bebf0474665e47552fc0ee8 100644 --- a/tf_adapter/util/npu_attrs.cc +++ b/tf_adapter/util/npu_attrs.cc @@ -57,7 +57,6 @@ bool NpuAttrs::CheckIsNewDataTransfer() { uint32_t device_id = 0U; (void)GetDeviceID(device_id); std::map init_options = NpuAttrs::GetInitOptions(); - NpuAttrs::LogOptions(init_options); GePlugin::GetInstance()->Init(init_options); ADP_LOG(INFO) << "Start to set device for data transfer."; auto ret = aclrtSetDevice(static_cast(device_id)); diff --git a/tf_adapter/util/session_manager.cc b/tf_adapter/util/session_manager.cc index 781ff0181c3e68299113f5d0768576887c475cec..465b8d99e0d08480403775779303facb98001d44 100644 --- a/tf_adapter/util/session_manager.cc +++ b/tf_adapter/util/session_manager.cc @@ -44,7 +44,8 @@ bool SessionManager::GetOrCreateGeSession(const std::string &tf_session, ge::Ses ADP_LOG(INFO) << "tf session " << tf_session << " get ge session success."; return true; } - + ADP_LOG(INFO) << "Session options: "; + NpuAttrs::LogOptions(sess_options); PrintGeSessionOptions(sess_options); bool ret = SessionManager::CreateGeSession(tf_session, ge_session, sess_options); if (!ret) {