From 4895336494bca4d67cd175a8c4fda3a2620f8676 Mon Sep 17 00:00:00 2001 From: Vidyasagar Ananthan Date: Thu, 22 Jan 2026 14:44:47 -0800 Subject: [PATCH] Speed up glob recurse. (#3626) [ROCm/composable_kernel commit: eb2dc8f466cd2978490ccc3ff794d898cad9535a] --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 54464d6809..9f1bdf8689 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -654,7 +654,9 @@ endif() -file(GLOB_RECURSE INSTANCE_FILES "${PROJECT_SOURCE_DIR}/*/device_*_instance.cpp") +# Optimization: Search only in library/src where all instance files actually live +# (was searching entire source tree, taking ~40s instead of <1s) +file(GLOB_RECURSE INSTANCE_FILES "${PROJECT_SOURCE_DIR}/library/src/*/device_*_instance.cpp") file(GLOB dir_list RELATIVE ${PROJECT_SOURCE_DIR}/library/src/tensor_operation_instance/gpu ${PROJECT_SOURCE_DIR}/library/src/tensor_operation_instance/gpu/*) set(CK_DEVICE_INSTANCES) FOREACH(subdir_path ${dir_list})