Skip to content

Commit

Permalink
apply review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangYiIntel committed Nov 28, 2024
1 parent b64d31b commit 88fec83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/plugins/intel_cpu/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,12 @@ static Config::ModelType getModelType(const std::shared_ptr<const Model>& model)
}

void Plugin::apply_rt_info(const std::shared_ptr<const ov::Model>& model, ov::intel_cpu::Config& config) const {
if (model->has_rt_info({"runtime_options", "KV_CACHE_PRECISION"})) {
config.kvCachePrecision = model->get_rt_info<ov::element::Type>({"runtime_options", "KV_CACHE_PRECISION"});
if (model->has_rt_info({"runtime_options", ov::hint::kv_cache_precision.name()})) {
config.kvCachePrecision = model->get_rt_info<ov::element::Type>({"runtime_options", ov::hint::kv_cache_precision.name()});
}
if (model->has_rt_info({"runtime_options", "DYNAMIC_QUANTIZATION_GROUP_SIZE"})) {
if (model->has_rt_info({"runtime_options", ov::hint::dynamic_quantization_group_size.name()})) {
config.fcDynamicQuantizationGroupSize =
model->get_rt_info<uint64_t>({"runtime_options", "DYNAMIC_QUANTIZATION_GROUP_SIZE"});
model->get_rt_info<uint64_t>({"runtime_options", ov::hint::dynamic_quantization_group_size.name()});
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ TEST_F(OVClassConfigTestCPU, smoke_CpuExecNetworkCheckCPURuntimOptions) {
ov::Any type;
ov::Any size;
ov::CompiledModel compiledModel;
model->set_rt_info("f16", "runtime_options", "KV_CACHE_PRECISION");
model->set_rt_info("0", "runtime_options", "DYNAMIC_QUANTIZATION_GROUP_SIZE");
model->set_rt_info("f16", "runtime_options", ov::hint::kv_cache_precision.name());
model->set_rt_info("0", "runtime_options", ov::hint::dynamic_quantization_group_size.name());
OV_ASSERT_NO_THROW(compiledModel = ie.compile_model(model, deviceName));
OV_ASSERT_NO_THROW(type = compiledModel.get_property(ov::hint::kv_cache_precision));
OV_ASSERT_NO_THROW(size = compiledModel.get_property(ov::hint::dynamic_quantization_group_size));
Expand Down

0 comments on commit 88fec83

Please sign in to comment.