diff --git a/CMakeLists.txt b/CMakeLists.txt index 69d63c8b20..cdf6829c4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -403,6 +403,11 @@ option(BUILD_FILE_REORG_BACKWARD_COMPATIBILITY "Build with file/folder reorg wit set( MIOPEN_INSTALL_DIR miopen) set( DATA_INSTALL_DIR ${CMAKE_INSTALL_DATAROOTDIR}/miopen ) +if(MIOPEN_ENABLE_AI_KERNEL_TUNING OR MIOPEN_ENABLE_AI_IMMED_MODE_FALLBACK) + find_package(frugally-deep CONFIG REQUIRED) + find_package(Eigen3 REQUIRED) +endif() + set(MIOPEN_GPU_SYNC Off CACHE BOOL "") if(BUILD_DEV) set(MIOPEN_BUILD_DEV 1) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d4b5b00420..4ed162ae92 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -733,8 +733,6 @@ if(BUILD_TESTING) endif() if(MIOPEN_ENABLE_AI_KERNEL_TUNING OR MIOPEN_ENABLE_AI_IMMED_MODE_FALLBACK) - find_package(frugally-deep CONFIG REQUIRED GLOBAL) - find_package(Eigen3 REQUIRED GLOBAL) target_link_libraries(MIOpen PRIVATE frugally-deep::fdeep Eigen3::Eigen) if(NOT TARGET nlohmann_json) # frugally-deep has broken linking to nlohmann_json