Skip to content

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

[GPU] Fix CM kernels not compiled in default build (#36528)

Aleksandr Voron4d2d8e993f1f
diff --git a/src/plugins/intel_gpu/src/graph/CMakeLists.txt b/src/plugins/intel_gpu/src/graph/CMakeLists.txt
index c9762fffbcb..c864f02c811 100644
--- a/src/plugins/intel_gpu/src/graph/CMakeLists.txt
+++ b/src/plugins/intel_gpu/src/graph/CMakeLists.txt
@@ -4,6 +4,10 @@
set(TARGET_NAME "openvino_intel_gpu_graph")
+if(ENABLE_CM_FOR_GPU)
+ add_compile_definitions(ENABLE_CM_FOR_GPU)
+endif()
+
file(GLOB SUBDIRS "${CMAKE_CURRENT_SOURCE_DIR}/impls/*")
find_host_package(Python3 REQUIRED COMPONENTS Interpreter)
diff --git a/src/plugins/intel_gpu/src/graph/impls/ocl/CMakeLists.txt b/src/plugins/intel_gpu/src/graph/impls/ocl/CMakeLists.txt
index 49283ea20a0..15f5cc4a8a3 100644
--- a/src/plugins/intel_gpu/src/graph/impls/ocl/CMakeLists.txt
+++ b/src/plugins/intel_gpu/src/graph/impls/ocl/CMakeLists.txt
@@ -8,10 +8,6 @@ ov_gpu_add_backend_target(
NAME ${TARGET_NAME}
)
-if(ENABLE_CM_FOR_GPU)
- target_compile_definitions(${TARGET_NAME} PRIVATE ENABLE_CM_FOR_GPU)
-endif()
-
ov_build_target_faster(${TARGET_NAME} PCH)
if(GPU_RT_TYPE STREQUAL "SYCL")