From 3eecbbbde3203ee5388b6b1621a167a8536054c7 Mon Sep 17 00:00:00 2001 From: Tony Davis Date: Mon, 6 Apr 2026 21:13:05 +0000 Subject: [PATCH 01/10] Update test configurations to include Windows platform support in GitHub Actions --- build_tools/github_actions/fetch_test_configurations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index efb318aefe..222ef0b6d4 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -79,7 +79,7 @@ def _get_script_path(script_name: str) -> str: # 240 min + 20% margin = 288 min "timeout_minutes": 288, "test_script": f"python {_get_script_path('test_runner.py')}", - "platform": ["linux"], + "platform": ["linux", "windows"], "total_shards_dict": { "linux": 6, "windows": 6, From 3ffec5b333fbf96072b4124d4066490ed295a2f5 Mon Sep 17 00:00:00 2001 From: Tony Davis Date: Thu, 9 Apr 2026 17:54:46 +0000 Subject: [PATCH 02/10] Enhance OpenBLAS and LAPACK package finding logic in CMake - Updated FindBLAS.cmake and FindLAPACK.cmake to support both OpenBLAS and OpenBLAS64. - Added checks for BLA_SIZEOF_INTEGER to ensure correct library is found based on integer size. - Improved error messages for missing dependencies in both BLAS and LAPACK configurations. - Adjusted CMakeLists.txt to include ILP64 reference BLAS for Windows client tests. This change ensures better compatibility and clearer error handling for users configuring BLAS and LAPACK in their projects. --- cmake/finders/FindBLAS.cmake | 22 +++++++++++++++++++++- cmake/finders/FindLAPACK.cmake | 24 ++++++++++++++++++++++-- math-libs/BLAS/CMakeLists.txt | 9 ++++++++- 3 files changed, 51 insertions(+), 4 deletions(-) diff --git a/cmake/finders/FindBLAS.cmake b/cmake/finders/FindBLAS.cmake index f2f5be11d5..7b6fde1c0c 100644 --- a/cmake/finders/FindBLAS.cmake +++ b/cmake/finders/FindBLAS.cmake @@ -6,14 +6,34 @@ cmake_policy(PUSH) cmake_policy(SET CMP0057 NEW) -if("OpenBLAS" IN_LIST THEROCK_PROVIDED_PACKAGES) +if(("OpenBLAS" IN_LIST THEROCK_PROVIDED_PACKAGES) OR ("OpenBLAS64" IN_LIST + THEROCK_PROVIDED_PACKAGES)) cmake_policy(POP) message(STATUS "Resolving bundled host-blas library from super-project") + set(_want_ilp64 FALSE) if(DEFINED BLA_SIZEOF_INTEGER AND BLA_SIZEOF_INTEGER EQUAL 8) + set(_want_ilp64 TRUE) + endif() + + if(_want_ilp64) + if(NOT "OpenBLAS64" IN_LIST THEROCK_PROVIDED_PACKAGES) + message( + FATAL_ERROR + "BLA_SIZEOF_INTEGER=8 (ILP64) requested but the super-project did not " + "provide OpenBLAS64. Add therock-host-blas64 to this subproject's " + "BUILD_DEPS or RUNTIME_DEPS.") + endif() find_package(OpenBLAS64 CONFIG REQUIRED) set(_OPENBLAS OpenBLAS64) else() + if(NOT "OpenBLAS" IN_LIST THEROCK_PROVIDED_PACKAGES) + message( + FATAL_ERROR + "LP64 BLAS requested but the super-project did not provide OpenBLAS. " + "Add therock-host-blas, or set BLA_SIZEOF_INTEGER=8 if only OpenBLAS64 " + "is available.") + endif() find_package(OpenBLAS CONFIG REQUIRED) set(_OPENBLAS OpenBLAS) endif() diff --git a/cmake/finders/FindLAPACK.cmake b/cmake/finders/FindLAPACK.cmake index a5cfa57c28..b9571f93eb 100644 --- a/cmake/finders/FindLAPACK.cmake +++ b/cmake/finders/FindLAPACK.cmake @@ -6,19 +6,39 @@ cmake_policy(PUSH) cmake_policy(SET CMP0057 NEW) -if("OpenBLAS" IN_LIST THEROCK_PROVIDED_PACKAGES) +if(("OpenBLAS" IN_LIST THEROCK_PROVIDED_PACKAGES) OR ("OpenBLAS64" IN_LIST + THEROCK_PROVIDED_PACKAGES)) cmake_policy(POP) message(STATUS "Resolving bundled host-blas library from super-project") + set(_want_ilp64 FALSE) if(DEFINED BLA_SIZEOF_INTEGER AND BLA_SIZEOF_INTEGER EQUAL 8) + set(_want_ilp64 TRUE) + endif() + + if(_want_ilp64) + if(NOT "OpenBLAS64" IN_LIST THEROCK_PROVIDED_PACKAGES) + message( + FATAL_ERROR + "BLA_SIZEOF_INTEGER=8 (ILP64) requested but the super-project did not " + "provide OpenBLAS64. Add therock-host-blas64 to this subproject's " + "BUILD_DEPS or RUNTIME_DEPS.") + endif() find_package(OpenBLAS64 CONFIG REQUIRED) set(_OPENBLAS OpenBLAS64) else() + if(NOT "OpenBLAS" IN_LIST THEROCK_PROVIDED_PACKAGES) + message( + FATAL_ERROR + "LP64 LAPACK requested but the super-project did not provide OpenBLAS. " + "Add therock-host-blas, or set BLA_SIZEOF_INTEGER=8 if only OpenBLAS64 " + "is available.") + endif() find_package(OpenBLAS CONFIG REQUIRED) set(_OPENBLAS OpenBLAS) endif() - # See: https://cmake.org/cmake/help/latest/module/FindBLAS.html + # See: https://cmake.org/cmake/help/latest/module/FindLAPACK.html set(LAPACK_LINKER_FLAGS) set(LAPACK_LIBRARIES ${_OPENBLAS}::OpenBLAS) add_library(LAPACK::LAPACK ALIAS ${_OPENBLAS}::OpenBLAS) diff --git a/math-libs/BLAS/CMakeLists.txt b/math-libs/BLAS/CMakeLists.txt index 623cb8e977..909d717d31 100644 --- a/math-libs/BLAS/CMakeLists.txt +++ b/math-libs/BLAS/CMakeLists.txt @@ -174,7 +174,13 @@ if(NOT WIN32) list(APPEND rocBLAS_optional_runtime_deps rocm_smi_lib) endif() elseif(THEROCK_BUILD_TESTING) - list(APPEND rocBLAS_optional_runtime_deps therock-host-blas) + # Windows client tests use ILP64 reference BLAS (see cmake/finders/FindBLAS.cmake). + list(APPEND rocBLAS_optional_runtime_deps therock-host-blas64) +endif() + +set(rocBLAS_extra_cmake_args) +if(WIN32 AND THEROCK_BUILD_TESTING) + list(APPEND rocBLAS_extra_cmake_args -DROCBLAS_CLIENTS_REFERENCE_ILP64=ON) endif() # Disable rocBLAS samples on Windows due to use of deprecated @@ -206,6 +212,7 @@ therock_cmake_subproject_declare(rocBLAS -DBUILD_CLIENTS_SAMPLES=${_blas_build_samples} -DBUILD_CLIENTS_BENCHMARKS=${THEROCK_BUILD_TESTING} -DLINK_BLIS=OFF + ${rocBLAS_extra_cmake_args} CMAKE_INCLUDES therock_explicit_finders.cmake COMPILER_TOOLCHAIN From d4fa9b2fa0dd8b09e9c47edf946f85020520f87f Mon Sep 17 00:00:00 2001 From: Tony Davis Date: Fri, 10 Apr 2026 18:03:50 +0000 Subject: [PATCH 03/10] Refactor CMakeLists.txt for improved testing configuration - Adjusted conditional logic for Windows client tests to ensure ILP64 reference BLAS is linked correctly. - Enhanced clarity in comments regarding the use of BLA_SIZEOF_INTEGER for integer size detection. This change streamlines the build configuration for testing on Windows platforms. --- math-libs/BLAS/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/math-libs/BLAS/CMakeLists.txt b/math-libs/BLAS/CMakeLists.txt index 909d717d31..14f3019c31 100644 --- a/math-libs/BLAS/CMakeLists.txt +++ b/math-libs/BLAS/CMakeLists.txt @@ -173,13 +173,14 @@ if(NOT WIN32) if(TARGET rocm_smi_lib) list(APPEND rocBLAS_optional_runtime_deps rocm_smi_lib) endif() -elseif(THEROCK_BUILD_TESTING) - # Windows client tests use ILP64 reference BLAS (see cmake/finders/FindBLAS.cmake). +endif() +if(THEROCK_BUILD_TESTING) + # Client tests link ILP64 reference BLAS (see cmake/finders/FindBLAS.cmake + BLA_SIZEOF_INTEGER=8). list(APPEND rocBLAS_optional_runtime_deps therock-host-blas64) endif() set(rocBLAS_extra_cmake_args) -if(WIN32 AND THEROCK_BUILD_TESTING) +if(THEROCK_BUILD_TESTING) list(APPEND rocBLAS_extra_cmake_args -DROCBLAS_CLIENTS_REFERENCE_ILP64=ON) endif() From 66ab9c49a674ef47908bc021b207111a0bc72048 Mon Sep 17 00:00:00 2001 From: Tony Davis Date: Fri, 10 Apr 2026 22:37:49 +0000 Subject: [PATCH 04/10] Revert "Update test configurations to include Windows platform support in GitHub Actions" This reverts commit 3eecbbbde3203ee5388b6b1621a167a8536054c7. --- build_tools/github_actions/fetch_test_configurations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index f28f931c85..edeee3e639 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -80,7 +80,7 @@ def _get_script_path(script_name: str) -> str: # 240 min + 20% margin = 288 min "timeout_minutes": 288, "test_script": f"python {_get_script_path('test_runner.py')}", - "platform": ["linux", "windows"], + "platform": ["linux"], "total_shards_dict": { "linux": 6, "windows": 6, From 4ede1e9737bf89d27eb48eff3d3dc0a56a31bbc2 Mon Sep 17 00:00:00 2001 From: Tony Davis Date: Fri, 10 Apr 2026 23:14:56 +0000 Subject: [PATCH 05/10] Bump rocm-libraries submodule to 550570f5 for testing Points the submodule at 550570f546b3808ae17163bab9c4b7c36ae17c3e (local testing). Made-with: Cursor --- rocm-libraries | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocm-libraries b/rocm-libraries index f000f7786e..550570f546 160000 --- a/rocm-libraries +++ b/rocm-libraries @@ -1 +1 @@ -Subproject commit f000f7786e9ac67510549f4d17784d327705e295 +Subproject commit 550570f546b3808ae17163bab9c4b7c36ae17c3e From cdb75a95088a73502e71d3e50fc804f696e3d391 Mon Sep 17 00:00:00 2001 From: Tony Davis Date: Fri, 10 Apr 2026 23:31:35 +0000 Subject: [PATCH 06/10] Revert "Bump rocm-libraries submodule to 550570f5 for testing" This reverts commit 4ede1e9737bf89d27eb48eff3d3dc0a56a31bbc2. --- rocm-libraries | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocm-libraries b/rocm-libraries index 550570f546..f000f7786e 160000 --- a/rocm-libraries +++ b/rocm-libraries @@ -1 +1 @@ -Subproject commit 550570f546b3808ae17163bab9c4b7c36ae17c3e +Subproject commit f000f7786e9ac67510549f4d17784d327705e295 From 50b393b98452f5617cb5afdcba5ab1f5dfe99f84 Mon Sep 17 00:00:00 2001 From: Tony Davis Date: Fri, 10 Apr 2026 23:32:03 +0000 Subject: [PATCH 07/10] Bump rocm-libraries submodule to 46006aba Points the submodule at 46006abab39e3c916aea2afb6fd75171a6291658. Made-with: Cursor --- rocm-libraries | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocm-libraries b/rocm-libraries index f000f7786e..46006abab3 160000 --- a/rocm-libraries +++ b/rocm-libraries @@ -1 +1 @@ -Subproject commit f000f7786e9ac67510549f4d17784d327705e295 +Subproject commit 46006abab39e3c916aea2afb6fd75171a6291658 From c6e6ea5a0200b1a7c0ce8879f440ab754bd91996 Mon Sep 17 00:00:00 2001 From: Tony Davis Date: Sun, 12 Apr 2026 14:59:10 +0000 Subject: [PATCH 08/10] Revert "Bump rocm-libraries submodule to 46006aba" This reverts commit 50b393b98452f5617cb5afdcba5ab1f5dfe99f84. --- rocm-libraries | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocm-libraries b/rocm-libraries index 46006abab3..f000f7786e 160000 --- a/rocm-libraries +++ b/rocm-libraries @@ -1 +1 @@ -Subproject commit 46006abab39e3c916aea2afb6fd75171a6291658 +Subproject commit f000f7786e9ac67510549f4d17784d327705e295 From e860950ab04123696d34708068f7d918df2f1fbc Mon Sep 17 00:00:00 2001 From: Tony Davis Date: Sun, 12 Apr 2026 14:59:57 +0000 Subject: [PATCH 09/10] Bump rocm-libraries submodule to 83700a79 Points the submodule at 83700a79d25b025dabb30095e4e6ec45bc05ccb1. Made-with: Cursor --- rocm-libraries | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocm-libraries b/rocm-libraries index f000f7786e..83700a79d2 160000 --- a/rocm-libraries +++ b/rocm-libraries @@ -1 +1 @@ -Subproject commit f000f7786e9ac67510549f4d17784d327705e295 +Subproject commit 83700a79d25b025dabb30095e4e6ec45bc05ccb1 From 4275d91c33b322ea0a59cac18b2116523511bd96 Mon Sep 17 00:00:00 2001 From: Tony Davis Date: Sun, 12 Apr 2026 15:09:34 +0000 Subject: [PATCH 10/10] Defer cmake_policy(POP) until after IN_LIST checks in BLAS/LAPACK finders Keep CMP0057 NEW in effect for all THEROCK_PROVIDED_PACKAGES IN_LIST uses before restoring the policy stack (addresses Copilot review on PR #4470). Made-with: Cursor --- cmake/finders/FindBLAS.cmake | 2 +- cmake/finders/FindLAPACK.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/finders/FindBLAS.cmake b/cmake/finders/FindBLAS.cmake index 7b6fde1c0c..25d0f909f5 100644 --- a/cmake/finders/FindBLAS.cmake +++ b/cmake/finders/FindBLAS.cmake @@ -8,7 +8,6 @@ cmake_policy(SET CMP0057 NEW) if(("OpenBLAS" IN_LIST THEROCK_PROVIDED_PACKAGES) OR ("OpenBLAS64" IN_LIST THEROCK_PROVIDED_PACKAGES)) - cmake_policy(POP) message(STATUS "Resolving bundled host-blas library from super-project") set(_want_ilp64 FALSE) @@ -45,6 +44,7 @@ if(("OpenBLAS" IN_LIST THEROCK_PROVIDED_PACKAGES) OR ("OpenBLAS64" IN_LIST set(BLAS95_LIBRARIES) set(BLAS95_FOUND FALSE) set(BLAS_FOUND TRUE) + cmake_policy(POP) else() cmake_policy(POP) set(BLAS_FOUND FALSE) diff --git a/cmake/finders/FindLAPACK.cmake b/cmake/finders/FindLAPACK.cmake index b9571f93eb..20263aa71a 100644 --- a/cmake/finders/FindLAPACK.cmake +++ b/cmake/finders/FindLAPACK.cmake @@ -8,7 +8,6 @@ cmake_policy(SET CMP0057 NEW) if(("OpenBLAS" IN_LIST THEROCK_PROVIDED_PACKAGES) OR ("OpenBLAS64" IN_LIST THEROCK_PROVIDED_PACKAGES)) - cmake_policy(POP) message(STATUS "Resolving bundled host-blas library from super-project") set(_want_ilp64 FALSE) @@ -45,6 +44,7 @@ if(("OpenBLAS" IN_LIST THEROCK_PROVIDED_PACKAGES) OR ("OpenBLAS64" IN_LIST set(LAPACK95_LIBRARIES) set(LAPACK95_FOUND FALSE) set(LAPACK_FOUND TRUE) + cmake_policy(POP) else() cmake_policy(POP) set(LAPACK_FOUND FALSE)