Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[GPU] Enable bf16 state conversions (#27361)

Roman Lyamin0c84af069a34
diff --git a/src/plugins/intel_gpu/src/plugin/common_utils.cpp b/src/plugins/intel_gpu/src/plugin/common_utils.cpp
index 2daeb09c90a..ddd6b5677ad 100644
--- a/src/plugins/intel_gpu/src/plugin/common_utils.cpp
+++ b/src/plugins/intel_gpu/src/plugin/common_utils.cpp
@@ -83,9 +83,11 @@ void convert_and_copy(const void* src_ptr, ov::element::Type src_et, void* dst_p
// For state conversions
CASE(ov::element::f32, ov::element::f32, float, float);
- CASE(ov::element::f16, ov::element::f16, ov::float16, ov::float16);
CASE(ov::element::f32, ov::element::f16, float, ov::float16);
CASE(ov::element::f16, ov::element::f32, ov::float16, float);
+ CASE(ov::element::f16, ov::element::f16, ov::float16, ov::float16);
+ CASE(ov::element::bf16, ov::element::f32, ov::bfloat16, float);
+ CASE(ov::element::bf16, ov::element::f16, ov::bfloat16, ov::float16);
OPENVINO_THROW("[GPU] Unsupported element types combination for copy: ", src_et, " -> ", dst_et);
}
diff --git a/src/plugins/intel_gpu/src/runtime/execution_config.cpp b/src/plugins/intel_gpu/src/runtime/execution_config.cpp
index f3b9058f7eb..7c8e55cddfe 100644
--- a/src/plugins/intel_gpu/src/runtime/execution_config.cpp
+++ b/src/plugins/intel_gpu/src/runtime/execution_config.cpp
@@ -212,16 +212,6 @@ void ExecutionConfig::apply_debug_options(const cldnn::device_info& info) {
set_property(ov::hint::dynamic_quantization_group_size(debug_config->dynamic_quantize_group_size));
}
- int KVCacheCompression = 0;
- if (const auto env_var = std::getenv("KVCacheCompression")) {
- std::istringstream ss(env_var);
- ss >> KVCacheCompression;
- }
-
- if (KVCacheCompression == 1) {
- set_property(ov::hint::kv_cache_precision(ov::element::i8));
- }
-
GPU_DEBUG_IF(debug_config->use_kv_cache_compression != -1) {
GPU_DEBUG_IF(debug_config->use_kv_cache_compression == 1) {
set_property(ov::hint::kv_cache_precision(ov::element::i8));