Skip to content

Commit

Permalink
[GPU] Handle undefined user value for kv cache precision
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Paramuzov <[email protected]>
  • Loading branch information
vladimir-paramuzov committed Jan 23, 2025
1 parent c108f37 commit 79d5cb8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/plugins/intel_gpu/src/runtime/execution_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ void ExecutionConfig::apply_user_properties(const cldnn::device_info& info) {
}
}

if (!is_set_by_user(ov::hint::kv_cache_precision)) {
if (!is_set_by_user(ov::hint::kv_cache_precision) || get_property(ov::hint::kv_cache_precision) == ov::element::undefined) {
if (info.supports_immad) { // MFDNN-11755
set_property(ov::hint::kv_cache_precision(get_property(ov::hint::inference_precision)));
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ class KVCacheIssueTests: public ::testing::Test {
auto core = ov::test::utils::PluginCache::get().core();

ov::AnyMap properties = {
ov::hint::kv_cache_precision(ov::element::undefined)
ov::hint::kv_cache_precision(ov::element::f16)
};

const size_t n_batch = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class SDPAWithKVCacheTest : public ::testing::Test, public ::testing::WithParamI
if (p.compressed) {
properties.emplace(ov::hint::kv_cache_precision(ov::element::i8));
} else {
properties.emplace(ov::hint::kv_cache_precision(ov::element::undefined));
properties.emplace(ov::hint::kv_cache_precision(ov::element::f16));
}

const size_t n_heads = 16;
Expand Down

0 comments on commit 79d5cb8

Please sign in to comment.