From 7aef3c6a2c8fdf681a38b42408c5eae8a6aaa32b Mon Sep 17 00:00:00 2001 From: Illia Silin <98187287+illsilin@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:31:56 -0700 Subject: [PATCH] only build tests and examples if user sets GPU_TARGETS (#1565) [ROCm/composable_kernel commit: f46a9eee9dbcf44697b3dad27f0675ca6d877d99] --- CMakeLists.txt | 2 +- README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f22bb4b61..cfcfa24b37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -549,7 +549,7 @@ ENDFOREACH() add_custom_target(instances DEPENDS utility;${CK_DEVICE_INSTANCES} SOURCES ${INSTANCE_FILES}) add_subdirectory(library) -if(NOT GPU_ARCHS) +if(NOT GPU_ARCHS AND USER_GPU_TARGETS) rocm_package_setup_component(tests LIBRARY_NAME composablekernel PACKAGE_NAME tests # Prevent -static suffix on package name diff --git a/README.md b/README.md index 34ac0919ae..4366ec0329 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,7 @@ Docker images are available on [DockerHub](https://hub.docker.com/r/rocm/composa If you don't set `GPU_TARGETS` on the cmake command line, CK is built for all GPU targets supported by the current compiler (this may take a long time). + Tests and examples will only get built if the GPU_TARGETS is set by the user on the cmake command line. NOTE: If you try setting `GPU_TARGETS` to a list of architectures, the build will only work if the architectures are similar, e.g., `gfx908;gfx90a`, or `gfx1100;gfx1101;gfx11012`. Otherwise, if you