Skip to content

Commit 1616c9d

Browse files
NPUW: Fix long tensors names (openvinotoolkit#28591)
CVS-159901 CVS-160529 --------- Co-authored-by: Dmitry Matveev <dmitry.matveev@intel.com>
1 parent 4a63b93 commit 1616c9d

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/plugins/intel_npu/src/plugin/npuw/compiled_model.cpp

+9-10
Original file line numberDiff line numberDiff line change
@@ -863,12 +863,13 @@ std::string ov::npuw::CompiledModel::funcall_mem_device(const std::size_t idx) c
863863

864864
void ov::npuw::CompiledModel::remove_long_output_names(const std::shared_ptr<ov::Model>& model) {
865865
NPUW_ASSERT(model.get() != nullptr);
866-
for (auto& output : model->outputs()) {
867-
const auto& tensor_names = output.get_tensor().get_names();
868-
if (tensor_names.size() > 32) { // maximum supported
869-
output.get_tensor().set_names({});
870-
LOG_INFO("Removed output tensor names for " << model->get_friendly_name());
871-
LOG_BLOCK();
866+
for (auto node : model->get_ordered_ops()) {
867+
for (auto &&output : node->outputs()) {
868+
const auto& tensor_names = output.get_tensor().get_names();
869+
if (tensor_names.size() > 32) {
870+
LOG_VERB(model->get_friendly_name() << " output " << output << " exceeds the name limit, removing...");
871+
output.get_tensor().set_names({});
872+
}
872873
}
873874
}
874875
}
@@ -883,17 +884,15 @@ void ov::npuw::CompiledModel::fill_empty_tensor_names(const std::shared_ptr<ov::
883884
const auto& tensor_names = input.get_tensor().get_names();
884885
if (tensor_names.empty()) {
885886
input.get_tensor().set_names({"npuw_in_tensor_" + std::to_string(in_tensor_idx)});
886-
LOG_INFO("Added input tensor name for " << model->get_friendly_name());
887-
LOG_BLOCK();
887+
LOG_VERB("Added input tensor name for " << model->get_friendly_name());
888888
}
889889
in_tensor_idx++;
890890
}
891891
for (auto& output : model->outputs()) {
892892
const auto& tensor_names = output.get_tensor().get_names();
893893
if (tensor_names.empty()) {
894894
output.get_tensor().set_names({"npuw_out_tensor_" + std::to_string(out_tensor_idx)});
895-
LOG_INFO("Added output tensor name for " << model->get_friendly_name());
896-
LOG_BLOCK();
895+
LOG_VERB("Added output tensor name for " << model->get_friendly_name());
897896
}
898897
out_tensor_idx++;
899898
}

0 commit comments

Comments
 (0)