From ba9783ece1b39b97859d74bf5417e77159ea815f Mon Sep 17 00:00:00 2001 From: Illia Silin <98187287+illsilin@users.noreply.github.com> Date: Mon, 7 Oct 2024 15:45:19 -0700 Subject: [PATCH] add a CK_USE_CODEGEN build argument to enable codegen (#1552) * add a CK_USE_CODEGEN build argument to enable codegen * fix cmake codegen logic [ROCm/composable_kernel commit: 7733ae167bf7b683a65da66148bd98a0bccd35eb] --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 989995d0f5..6ad6307cb3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,6 +97,10 @@ if(DL_KERNELS) add_definitions(-DDL_KERNELS) set(CK_ENABLE_DL_KERNELS "ON") endif() +option(CK_USE_CODEGEN "Enable codegen library" OFF) +if(CK_USE_CODEGEN) + add_definitions(-DCK_USE_CODEGEN) +endif() include(getopt) @@ -563,7 +567,7 @@ rocm_package_setup_component(profiler ) add_subdirectory(profiler) -if(GPU_TARGETS MATCHES "gfx9" OR GPU_ARCHS) +if(CK_USE_CODEGEN AND (GPU_TARGETS MATCHES "gfx9" OR GPU_ARCHS)) add_subdirectory(codegen) endif()