OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[GPU] improve writing about enable_kernels_reuse (#36912)
Mingyu Kim3a23a01a82d4
diff --git a/src/inference/include/openvino/runtime/intel_gpu/properties.hpp b/src/inference/include/openvino/runtime/intel_gpu/properties.hppindex 656a6b7d649..939f3d60d0c 100644--- a/src/inference/include/openvino/runtime/intel_gpu/properties.hpp+++ b/src/inference/include/openvino/runtime/intel_gpu/properties.hpp@@ -146,10 +146,10 @@ static constexpr Property<bool> enable_sdpa_optimization{"GPU_ENABLE_SDPA_OPTIMIstatic constexpr Property<bool> enable_lora_operation{"GPU_ENABLE_LORA_OPERATION"};/**- * @brief Turning on this property enables kernels reuse between implementations, resulting in a lower memory footprint.- * However, as a drawback, OpenCL set_arguments() call will be made more often, resulting in higher host pressure- * and slower execution in some host-bottleneck cases.- * This property is available only for single-stream scenarios and will be ignored in other cases.+ * @brief Enables kernel reuse across implementations to reduce memory footprint.+ * As a trade-off, OpenCL set_arguments() is invoked more frequently, which increases host CPU usage+ * and may slow down execution.+ * This property applies only to single-stream scenarios and is ignored otherwise.* @ingroup ov_runtime_ocl_gpu_prop_cpp_api*/static constexpr Property<bool> enable_kernels_reuse{"GPU_ENABLE_KERNELS_REUSE"};diff --git a/src/plugins/intel_gpu/include/intel_gpu/runtime/options.inl b/src/plugins/intel_gpu/include/intel_gpu/runtime/options.inlindex 0cab3a5f5f5..47b7aeedc79 100644--- a/src/plugins/intel_gpu/include/intel_gpu/runtime/options.inl+++ b/src/plugins/intel_gpu/include/intel_gpu/runtime/options.inl@@ -31,7 +31,7 @@ OV_CONFIG_RELEASE_OPTION(ov, cache_encryption_callbacks, ov::EncryptionCallbacksOV_CONFIG_RELEASE_OPTION(ov::hint, dynamic_quantization_group_size, 0, "Dynamic quantization group size")OV_CONFIG_RELEASE_OPTION(ov::intel_gpu::hint, dynamic_quantization_group_size_max, UINT64_MAX, "Maximum dynamic quantization group size. When group_size is set as a higher value than this number, dynamic quantization will be turned off")OV_CONFIG_RELEASE_OPTION(ov::hint, kv_cache_precision, ov::element::dynamic, "")-OV_CONFIG_RELEASE_OPTION(ov::intel_gpu::hint, enable_kernels_reuse, false, "")+OV_CONFIG_RELEASE_OPTION(ov::intel_gpu::hint, enable_kernels_reuse, false, "Enables kernel reuse across implementations to reduce memory footprint.")OV_CONFIG_RELEASE_OPTION(ov, weights_path, "", "Path to the model weights file used for weightless caching")OV_CONFIG_RELEASE_OPTION(ov::hint, activations_scale_factor, -1.0f, "Scalar floating point value that is used for runtime activation tensor scaling with fp16 inference precision")OV_CONFIG_RELEASE_OPTION(ov::internal, enable_lp_transformations, false, "Enable/Disable Low precision transformations set")diff --git a/src/plugins/intel_gpu/src/runtime/ocl/ocl_device.cpp b/src/plugins/intel_gpu/src/runtime/ocl/ocl_device.cppindex 15d8f056fe7..9ca9141bd11 100644--- a/src/plugins/intel_gpu/src/runtime/ocl/ocl_device.cpp+++ b/src/plugins/intel_gpu/src/runtime/ocl/ocl_device.cpp@@ -310,9 +310,6 @@ device_info init_device_info(const cl::Device& device, const cl::Context& contexinfo.gfx_ver.major > 12 || (info.gfx_ver.major == 12 && info.gfx_ver.minor >= 70)) {info.has_separate_cache = true;}- GPU_DEBUG_INFO << "GPU version: "- << static_cast<int>(info.gfx_ver.major) << "." << static_cast<int>(info.gfx_ver.minor) << "." << static_cast<int>(info.gfx_ver.revision)- << (info.has_separate_cache ? " with separate cache" : "") << std::endl;} else if (nv_device_attr_supported) {info.gfx_ver = {static_cast<uint16_t>(device.getInfo<CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV>()),static_cast<uint8_t>(device.getInfo<CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV>()),@@ -377,6 +374,25 @@ device_info init_device_info(const cl::Device& device, const cl::Context& contexinfo.arch = gpu_arch::unknown;#endif // ENABLE_ONEDNN_FOR_GPU+ auto arch_to_string = [](gpu_arch arch) -> const char* {+ switch (arch) {+ case gpu_arch::unknown: return "unknown";+ case gpu_arch::gen9: return "gen9";+ case gpu_arch::gen11: return "gen11";+ case gpu_arch::xe_lp: return "xe_lp";+ case gpu_arch::xe_hp: return "xe_hp";+ case gpu_arch::xe_hpg: return "xe_hpg";+ case gpu_arch::xe_hpc: return "xe_hpc";+ case gpu_arch::xe2: return "xe2";+ case gpu_arch::xe3: return "xe3";+ case gpu_arch::xe3p: return "xe3p";+ }+ return "unknown";+ };+ GPU_DEBUG_INFO << "GPU architecture: " << arch_to_string(info.arch) << ", version: "+ << static_cast<int>(info.gfx_ver.major) << "." << static_cast<int>(info.gfx_ver.minor) << "." << static_cast<int>(info.gfx_ver.revision)+ << (info.has_separate_cache ? " with separate cache" : "") << std::endl;+return info;}