diff --git a/BUILD_TOPOLOGY.toml b/BUILD_TOPOLOGY.toml index 5b6abbbbafa..c15aba88acb 100644 --- a/BUILD_TOPOLOGY.toml +++ b/BUILD_TOPOLOGY.toml @@ -331,6 +331,14 @@ platform = "windows" artifact_deps = ["core-hip"] feature_group = "CORE" # Part of core, enabled by default +# --- hip-tests (per-arch) --- + +[artifacts.core-hiptests] +artifact_group = "hip-runtime" +type = "target-specific" +artifact_deps = ["core-hip"] +feature_group = "CORE" # Part of core, enabled by default + # --- Math Libraries (per-arch) --- [artifacts.blas] diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 5af0c1505c8..69d28026a0f 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -203,6 +203,51 @@ if(THEROCK_ENABLE_HIP_RUNTIME) ) endif() + if(THEROCK_BUILD_TESTING) + set(HIP_TESTS_CMAKE_ARGS) + set(_hip_tests_subproject_names) + therock_cmake_subproject_declare(hip-tests + USE_DIST_AMDGPU_TARGETS + EXTERNAL_SOURCE_DIR "${THEROCK_ROCM_SYSTEMS_SOURCE_DIR}/projects/hip-tests/catch" + BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/hip-tests" + BACKGROUND_BUILD + COMPILER_TOOLCHAIN + amd-hip + CMAKE_ARGS + -DHIP_PLATFORM="amd" + -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON + BUILD_DEPS + rocm-cmake + therock-boost + therock-catch2 + RUNTIME_DEPS + hip-clr + ${THEROCK_BUNDLED_NUMACTL} + INTERFACE_LINK_DIRS + lib + lib/rocm_sysdeps/lib + INTERFACE_INSTALL_RPATH_DIRS + lib + lib/rocm_sysdeps/lib + ) + therock_cmake_subproject_glob_c_sources(hip-tests SUBDIRS catch) + therock_cmake_subproject_activate(hip-tests) + if(WIN32) + set(hip-tests_artifact_file artifact-core-hiptests_win.toml) + else() + set(hip-tests_artifact_file artifact-core-hiptests.toml) + endif() + # Provide it as an artifact: + therock_provide_artifact(core-hiptests + TARGETS USE_DIST_AMDGPU_TARGETS + DESCRIPTOR ${hip-tests_artifact_file} + COMPONENTS + test + SUBPROJECT_DEPS + hip-tests + ) + list(APPEND _hip_tests_subproject_names hip-tests) + endif(THEROCK_BUILD_TESTING) endif(THEROCK_ENABLE_HIP_RUNTIME) ################################################################################ diff --git a/core/artifact-core-hiptests.toml b/core/artifact-core-hiptests.toml new file mode 100644 index 00000000000..b0a753e08bc --- /dev/null +++ b/core/artifact-core-hiptests.toml @@ -0,0 +1,9 @@ +# hiptests +[components.dbg."core/hip-tests/stage"] +[components.dev."core/hip-tests/stage"] +[components.doc."core/hip-tests/stage"] +[components.lib."core/hip-tests/stage"] +[components.test."core/hip-tests/stage"] +include = [ + "share/hip/**", +] diff --git a/core/artifact-core-hiptests_win.toml b/core/artifact-core-hiptests_win.toml new file mode 100644 index 00000000000..48ce3b5af75 --- /dev/null +++ b/core/artifact-core-hiptests_win.toml @@ -0,0 +1,9 @@ +# hip-tests +[components.dbg."core/hip-tests/stage"] +[components.dev."core/hip-tests/stage"] +[components.doc."core/hip-tests/stage"] +[components.lib."core/hip-tests/stage"] +[components.test."core/hip-tests/stage"] +include = [ + "catch_tests/**", +]