Skip to content

Commit 4d2d8e9

Browse files
authored
[GPU] Fix CM kernels not compiled in default build (openvinotoolkit#36528)
### Details: - openvinotoolkit#36431 made `OV_GPU_WITH_CM` depend on the `ENABLE_CM_FOR_GPU` macro being defined at compile time, but added that compile definition only to the `openvino_intel_gpu_ocl_obj` target. The registry sources (registry/*_impls.cpp) compile into the main `openvino_intel_gpu_graph` target, which never received the definition - Define `ENABLE_CM_FOR_GPU` at the graph module directory scope (`src/graph/CMakeLists.txt`) via `add_compile_definitions`, so it reaches both the backend obj targets and the main graph target uniformly
1 parent 244eb6c commit 4d2d8e9

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/plugins/intel_gpu/src/graph/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
set(TARGET_NAME "openvino_intel_gpu_graph")
66

7+
if(ENABLE_CM_FOR_GPU)
8+
add_compile_definitions(ENABLE_CM_FOR_GPU)
9+
endif()
10+
711
file(GLOB SUBDIRS "${CMAKE_CURRENT_SOURCE_DIR}/impls/*")
812

913
find_host_package(Python3 REQUIRED COMPONENTS Interpreter)

src/plugins/intel_gpu/src/graph/impls/ocl/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ ov_gpu_add_backend_target(
88
NAME ${TARGET_NAME}
99
)
1010

11-
if(ENABLE_CM_FOR_GPU)
12-
target_compile_definitions(${TARGET_NAME} PRIVATE ENABLE_CM_FOR_GPU)
13-
endif()
14-
1511
ov_build_target_faster(${TARGET_NAME} PCH)
1612

1713
if(GPU_RT_TYPE STREQUAL "SYCL")

0 commit comments

Comments
 (0)