Skip to content

Commit

Permalink
[intel-npu] fixing typos in adapter prints. setting dq support to 6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
csoka committed Jan 10, 2025
1 parent 9e814c4 commit 86c7d5d
Showing 1 changed file with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,10 @@ std::string DriverCompilerAdapter::serializeConfig(const Config& config,
optLevelStr << keyOfOptL << KEY_VALUE_SEPARATOR << "\\d+";
std::ostringstream perfHintStr;
perfHintStr << keyOfPerfHO << KEY_VALUE_SEPARATOR << "\\S+";
logger.warning("%s property is not suppored by this compiler version. Removing from parameters",
logger.warning("%s property is not supported by this compiler version. Removing from parameters",
keyOfOptL.c_str());
valueOfParams = std::regex_replace(valueOfParams, std::regex(optLevelStr.str()), "");
logger.warning("%s property is not suppored by this compiler version. Removing from parameters",
logger.warning("%s property is not supported by this compiler version. Removing from parameters",
keyOfPerfHO.c_str());
valueOfParams = std::regex_replace(valueOfParams, std::regex(perfHintStr.str()), "");

Expand Down Expand Up @@ -483,7 +483,7 @@ std::string DriverCompilerAdapter::serializeConfig(const Config& config,
pinningstr << ov::hint::enable_cpu_pinning.name() << KEY_VALUE_SEPARATOR << VALUE_DELIMITER << "\\S+"
<< VALUE_DELIMITER;
logger.warning(
"ENABLE_CPU_PINNING property is not suppored by this compiler version. Removing from parameters");
"ENABLE_CPU_PINNING property is not supported by this compiler version. Removing from parameters");
content = std::regex_replace(content, std::regex(pinningstr.str()), "");
}

Expand All @@ -495,9 +495,9 @@ std::string DriverCompilerAdapter::serializeConfig(const Config& config,
std::ostringstream maxtilestr;
maxtilestr << ov::intel_npu::max_tiles.name() << KEY_VALUE_SEPARATOR << VALUE_DELIMITER << "\\d+"
<< VALUE_DELIMITER;
logger.warning("NPU_STEPPING property is not suppored by this compiler version. Removing from parameters");
logger.warning("NPU_STEPPING property is not supported by this compiler version. Removing from parameters");
content = std::regex_replace(content, std::regex(stepstr.str()), "");
logger.warning("NPU_MAX_TILES property is not suppored by this compiler version. Removing from parameters");
logger.warning("NPU_MAX_TILES property is not supported by this compiler version. Removing from parameters");
content = std::regex_replace(content, std::regex(maxtilestr.str()), "");
}

Expand All @@ -507,13 +507,13 @@ std::string DriverCompilerAdapter::serializeConfig(const Config& config,
precstr << ov::hint::inference_precision.name() << KEY_VALUE_SEPARATOR << VALUE_DELIMITER << "\\S+"
<< VALUE_DELIMITER;
logger.warning(
"INFERENCE_PRECISION_HINT property is not suppored by this compiler version. Removing from parameters");
"INFERENCE_PRECISION_HINT property is not supported by this compiler version. Removing from parameters");
content = std::regex_replace(content, std::regex(precstr.str()), "");
}

/// Replacing NPU_TILES (for all versions) with NPU_DPU_GROUPS for backwards compatibility
if (std::regex_search(content, std::regex(ov::intel_npu::tiles.name()))) {
logger.warning("NPU_TILES property is not suppored by this compiler version. Swaping it to "
logger.warning("NPU_TILES property is not supported by this compiler version. Swaping it to "
"NPU_DPU_GROUPS (obsolete)");
content = std::regex_replace(content, std::regex(ov::intel_npu::tiles.name()), "NPU_DPU_GROUPS");
}
Expand All @@ -524,7 +524,7 @@ std::string DriverCompilerAdapter::serializeConfig(const Config& config,
batchstr << ov::intel_npu::batch_mode.name() << KEY_VALUE_SEPARATOR << VALUE_DELIMITER << "\\S+"
<< VALUE_DELIMITER;

logger.warning("NPU_BATCH_MODE property is not suppored by this compiler version. Removing from parameters");
logger.warning("NPU_BATCH_MODE property is not supported by this compiler version. Removing from parameters");
content = std::regex_replace(content, std::regex(batchstr.str()), "");
}

Expand All @@ -534,17 +534,18 @@ std::string DriverCompilerAdapter::serializeConfig(const Config& config,
batchstr << ov::hint::execution_mode.name() << KEY_VALUE_SEPARATOR << VALUE_DELIMITER << "\\S+"
<< VALUE_DELIMITER;
logger.warning(
"EXECUTION_MODE_HINT property is not suppored by this compiler version. Removing from parameters");
"EXECUTION_MODE_HINT property is not supported by this compiler version. Removing from parameters");
content = std::regex_replace(content, std::regex(batchstr.str()), "");
}

// COMPILER_DYNAMIC_QUANTIZATION is not supported in versions < 6.1 - need to remove it
if ((compilerVersion.major < 6) || (compilerVersion.major == 6 && compilerVersion.minor < 3)) {
// COMPILER_DYNAMIC_QUANTIZATION is not supported in versions < 6.4 - need to remove it
if ((compilerVersion.major < 6) || (compilerVersion.major == 6 && compilerVersion.minor < 4)) {
std::ostringstream dqstr;
dqstr << ov::intel_npu::compiler_dynamic_quantization.name() << KEY_VALUE_SEPARATOR << VALUE_DELIMITER << "\\S+"
<< VALUE_DELIMITER;
logger.warning("COMPILER_DYNAMIC_QUANTIZATION property is not suppored by this compiler version. Removing from "
"parameters");
logger.warning(
"COMPILER_DYNAMIC_QUANTIZATION property is not supported by this compiler version. Removing from "
"parameters");
content = std::regex_replace(content, std::regex(dqstr.str()), "");
}

Expand Down

0 comments on commit 86c7d5d

Please sign in to comment.