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()