diff --git a/var/spack/repos/builtin/packages/aqlprofile/package.py b/var/spack/repos/builtin/packages/aqlprofile/package.py new file mode 100644 index 0000000000..ac336abb0b --- /dev/null +++ b/var/spack/repos/builtin/packages/aqlprofile/package.py @@ -0,0 +1,161 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import os + +from spack.package import * + +_versions = { + "6.0.2": { + "apt": ( + "57efc4e8380d941fc9e3ba8353bc724913cd5b5be2c53fed016e92da63e31b2f", + "https://repo.radeon.com/rocm/apt/6.0.2/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.60002.60002-115~20.04_amd64.deb", + ), + "yum": ( + "eb9099e86c3574124dfeec257217781b716f72c51cc5c11ed857d16cb0924467", + "https://repo.radeon.com/rocm/yum/6.0.2/main/hsa-amd-aqlprofile-1.0.0.60002.60002-115.el7.x86_64.rpm", + ), + "zyp": ( + "b752eb18eed98226bf0cffa492363d452b318432fd5ae01ad86172c4ce132bef", + "https://repo.radeon.com/rocm/zyp/6.0.2/main/hsa-amd-aqlprofile-1.0.0.60002.60002-sles154.115.x86_64.rpm", + ), + }, + "6.0.0": { + "apt": ( + "e120268933eab5eff25d1b7d0646b0785a13a9fb2dce2bdaca7ac2a19482339c", + "https://repo.radeon.com/rocm/apt/6.0/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.60000.60000-91~20.04_amd64.deb", + ), + "yum": ( + "431be1e9996a465e1305a312e238e9bc7de3991fa2488968a36195108ed7f7b5", + "https://repo.radeon.com/rocm/yum/6.0/main/hsa-amd-aqlprofile-1.0.0.60000.60000-91.el7.x86_64.rpm", + ), + "zyp": ( + "e64f3c0642b209753e2ede374eee80c36827db9de348c754a4385139f7203487", + "https://repo.radeon.com/rocm/zyp/6.0/main/hsa-amd-aqlprofile-1.0.0.60000.60000-sles154.91.x86_64.rpm", + ), + }, + "5.7.1": { + "apt": ( + "9f00713062005624231dac5fd3e92481b8d1547b3301c3b8a07298d4548037b8", + "https://repo.radeon.com/rocm/apt/5.7.1/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.50701.50701-98~20.04_amd64.deb", + ), + "yum": ( + "ea69d9deb604fdc0415070a9e3d8dbe90feecfc71533b92dd7507e2b8d2770de", + "https://repo.radeon.com/rocm/yum/5.7.1/main/hsa-amd-aqlprofile-1.0.0.50701.50701-98.el7.x86_64.rpm", + ), + "zyp": ( + "d83ca93e280764afc20e2eca01b8cc1c047e2a4db0131b4df58ec19f0ddc2a07", + "https://repo.radeon.com/rocm/zyp/5.7.1/main/hsa-amd-aqlprofile-1.0.0.50701.50701-sles154.98.x86_64.rpm", + ), + }, + "5.7.0": { + "apt": ( + "131e2d699eb24ff19cba54a9721b83c362196c91a8380b5e4b4ba3583311df21", + "https://repo.radeon.com/rocm/apt/5.7/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.50700.50700-63~20.04_amd64.deb", + ), + "yum": ( + "4f6eef63bb586c290b22234b3d849b382bcb4ddc0f28ed93b3232ca7f6914759", + "https://repo.radeon.com/rocm/yum/5.7/main/hsa-amd-aqlprofile-1.0.0.50700.50700-63.el7.x86_64.rpm", + ), + "zyp": ( + "61b7ba9022cdf2903dd476811d39f294cdb0fd4bd385785bcba9abe575e9b63c", + "https://repo.radeon.com/rocm/zyp/5.7/main/hsa-amd-aqlprofile-1.0.0.50700.50700-sles154.63.x86_64.rpm", + ), + }, + "5.6.1": { + "apt": ( + "ddb231dc4c8ca45e586ba68cae86273c3bc109f5ec172855815fce1ea6aff172", + "https://repo.radeon.com/rocm/apt/5.6.1/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.50601-93~20.04_amd64.deb", + ), + "yum": ( + "3c67b2e3cfbe71441d4c504dee2c55c9010a15ad7c973f1f858a052fb60524a6", + "https://repo.radeon.com/rocm/yum/5.6.1/main/hsa-amd-aqlprofile-1.0.0.50601-93.el7.x86_64.rpm", + ), + "zyp": ( + "956382a085356211a35cb24210764c4f5575ce4d3d842439e39cc94287004176", + "https://repo.radeon.com/rocm/zyp/5.6.1/main/hsa-amd-aqlprofile-1.0.0.50601-sles154.93.x86_64.rpm", + ), + }, + "5.6.0": { + "apt": ( + "67273e8513c0efdef6d52fb211a0cf4b7e117b1c5e737f8763946699324a9d7d", + "https://repo.radeon.com/rocm/apt/5.6/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.50600-67~20.04_amd64.deb", + ), + "yum": ( + "0aefd5f0eca5c1bcb55f5c80e946e252685533cbb3c936417abd44fe94c1f28e", + "https://repo.radeon.com/rocm/yum/5.6/main/hsa-amd-aqlprofile-1.0.0.50600-67.el7.x86_64.rpm", + ), + "zyp": ( + "b752eb18eed98226bf0cffa492363d452b318432fd5ae01ad86172c4ce132bef", + "https://repo.radeon.com/rocm/zyp/5.6/main/hsa-amd-aqlprofile-1.0.0.50600-sles154.67.x86_64.rpm", + ), + }, + "5.5.1": { + "apt": ( + "67b957abe5ea872abd3ec6b98eb83ef66fe07668001392e695dd77ab1b6d8890", + "https://repo.radeon.com/rocm/apt/5.5.1/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.50501-74~20.04_amd64.deb", + ), + "yum": ( + "2e6ae5a417d3a14a6b522b2daccbccea0a192ffe689b5e1817300ec2b65b60c2", + "https://repo.radeon.com/rocm/yum/5.5.1/main/hsa-amd-aqlprofile-1.0.0.50501-74.el7.x86_64.rpm", + ), + "zyp": ( + "3ad17b1628c308396d39f61c12f7403800468f54eb3f7b3ed4b47e076ea1b821", + "https://repo.radeon.com/rocm/zyp/5.5.1/main/hsa-amd-aqlprofile-1.0.0.50501-sles153.74.x86_64.rpm", + ), + }, + "5.5.0": { + "apt": ( + "fbe08a39a36499959198fa7678338cf2d7888dc2aafb4694072d1f37b24e599f", + "https://repo.radeon.com/rocm/apt/5.5/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.50500-63~20.04_amd64.deb", + ), + "yum": ( + "fde2d38174d25af9d780ef2a1e91eb75b0de5943711f20930367b9f28f77a8bd", + "https://repo.radeon.com/rocm/yum/5.5/main/hsa-amd-aqlprofile-1.0.0.50500-63.el7.x86_64.rpm", + ), + "zyp": ( + "eec9dc39ddbb0fc1f18e0b62a238252b3e0968152792c5b4948b3d001b07a53f", + "https://repo.radeon.com/rocm/zyp/5.5/main/hsa-amd-aqlprofile-1.0.0.50500-sles153.63.x86_64.rpm", + ), + }, +} + + +class Aqlprofile(Package): + """ + HSA extension AMD AQL profile library. + Provides AQL packets helper methods for perfcounters (PMC) and SQ threadtraces (SQTT). + """ + + maintainers("afzpatel", "srekolam", "renjithravindrankannath") + + spack_os = spack.platforms.host().default_os + if "rhel" in spack_os or "centos" in spack_os: + pkg_type = "yum" + elif "sles" in spack_os: + pkg_type = "zyp" + else: + pkg_type = "apt" + + for ver, packages in _versions.items(): + pkg = packages.get(pkg_type) + if pkg: + version(ver, sha256=pkg[0], url=pkg[1], expand=False) + + depends_on("cpio") + + def install(self, spec, prefix): + # find deb or rpm pkg and extract files + for file in os.listdir("."): + if file.endswith(".rpm"): + os.system(f"rpm2cpio {file} | cpio -idmv") + break + if file.endswith(".deb"): + os.system(f"ar vx {file}") + os.system("tar xvf data.tar.gz") + break + + install_tree(f"opt/rocm-{spec.version}/share/", prefix.share) + install_tree(f"opt/rocm-{spec.version}/lib/", prefix.lib) diff --git a/var/spack/repos/builtin/packages/hpctoolkit/define-hip-platform-as-amd.patch b/var/spack/repos/builtin/packages/hpctoolkit/define-hip-platform-as-amd.patch new file mode 100644 index 0000000000..e5ca24136e --- /dev/null +++ b/var/spack/repos/builtin/packages/hpctoolkit/define-hip-platform-as-amd.patch @@ -0,0 +1,13 @@ +t a/src/tool/hpcrun/Makefile.in b/src/tool/hpcrun/Makefile.in +index e273fe67d..380ba3ceb 100644 +--- a/src/tool/hpcrun/Makefile.in ++++ b/src/tool/hpcrun/Makefile.in +@@ -1998,7 +1998,7 @@ UNW_MIPS_INCLUDE_DIRS = \ + + UNW_MIPS_LD_FLAGS = + MY_CPP_DEFINES = -D_GNU_SOURCE -DINLINE_FN=1 -DLOCAL_BUILD=1 \ +- -D__HIP_PLATFORM_HCC__=1 $(am__append_11) $(am__append_16) \ ++ -D__HIP_PLATFORM_HCC__=1 -D__HIP_PLATFORM_AMD__=1 $(am__append_11) $(am__append_16) \ + $(am__append_22) $(am__append_106) $(am__append_110) \ + $(am__append_112) $(am__append_114) $(am__append_118) \ + $(am__append_135) $(am__append_139) $(am__append_143) diff --git a/var/spack/repos/builtin/packages/hpctoolkit/package.py b/var/spack/repos/builtin/packages/hpctoolkit/package.py index ce4a0367f7..97514dc7a9 100644 --- a/var/spack/repos/builtin/packages/hpctoolkit/package.py +++ b/var/spack/repos/builtin/packages/hpctoolkit/package.py @@ -229,6 +229,9 @@ class Hpctoolkit(AutotoolsPackage, MesonPackage): depends_on("python@3.4:", type="build", when="@2020.03:2020.08") patch("python3.patch", when="@2020.03:2020.08") + # HIP header files require HIP_PLATFORM_AMD to be set for AMD GPUs + patch("define-hip-platform-as-amd.patch", when="^hip@6:") + # Fix a bug where make would mistakenly overwrite hpcrun-fmt.h. # https://gitlab.com/hpctoolkit/hpctoolkit/-/merge_requests/751 def patch(self): diff --git a/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests-5.6.patch b/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests-5.6.patch new file mode 100644 index 0000000000..dc94db638c --- /dev/null +++ b/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests-5.6.patch @@ -0,0 +1,74 @@ +From b28744bd1c0df82efc952e5ad208927007adf6f5 Mon Sep 17 00:00:00 2001 +From: Afzal Patel +Date: Fri, 2 Feb 2024 13:38:22 +0000 +Subject: [PATCH] Disable tests and add fPIC compile option + +--- + CMakeLists.txt | 32 ++++---------------------------- + 1 file changed, 4 insertions(+), 28 deletions(-) + +diff git a/CMakeLists.txt b/CMakeLists.txt +index 8f94b58..95b0387 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,7 @@ endif() + + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) +-add_compile_options(-Wall) ++add_compile_options(-Wall -fPIC) + + set(THREADS_PREFER_PTHREAD_FLAG ON) + +@@ -162,17 +162,17 @@ add_subdirectory(src) + + if(${LIBRARY_TYPE} STREQUAL SHARED) + # Build samples +- add_subdirectory(samples) ++ # add_subdirectory(samples) + + # Build tests +- add_subdirectory(tests) ++ # add_subdirectory(tests) + endif() + + # Build Plugins + add_subdirectory(plugin) + + # Build tests +-add_subdirectory(${TEST_DIR} ${PROJECT_BINARY_DIR}/test) ++# add_subdirectory(${TEST_DIR} ${PROJECT_BINARY_DIR}/test) + + # Installation and packaging + set(DEST_NAME ${ROCPROFILER_NAME}) +@@ -239,30 +239,6 @@ install( + DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME} + COMPONENT runtime) + +-# librocprof-tool.so +-install( +- FILES ${PROJECT_BINARY_DIR}/test/librocprof-tool.so +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME} +- COMPONENT runtime) +- +-install( +- FILES ${PROJECT_BINARY_DIR}/test/librocprof-tool.so +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME} +- COMPONENT asan) +- +-install( +- FILES ${PROJECT_BINARY_DIR}/test/rocprof-ctrl +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME} +- PERMISSIONS +- OWNER_READ +- OWNER_WRITE +- OWNER_EXECUTE +- GROUP_READ +- GROUP_EXECUTE +- WORLD_READ +- WORLD_EXECUTE +- COMPONENT runtime) +- + # File reorg backward compatibility for non ASAN packaging + if ( NOT ENABLE_ASAN_PACKAGING ) + # File reorg Backward compatibility diff --git a/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests-5.7.patch b/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests-5.7.patch new file mode 100644 index 0000000000..698a693ca7 --- /dev/null +++ b/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests-5.7.patch @@ -0,0 +1,68 @@ +From e7dd0146c83527e4977ecf51b22c9cb6939d74f2 Mon Sep 17 00:00:00 2001 +From: Afzal Patel +Date: Fri, 2 Feb 2024 13:50:58 +0000 +Subject: [PATCH] Disable tests and add fPIC compile option + +--- + CMakeLists.txt | 26 ++++---------------------- + 1 file changed, 4 insertions(+), 22 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c8f5da7..5c2537a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,7 @@ endif() + + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) +-add_compile_options(-Wall) ++add_compile_options(-Wall -fPIC) + + set(THREADS_PREFER_PTHREAD_FLAG ON) + +@@ -162,17 +162,17 @@ add_subdirectory(src) + + if(${LIBRARY_TYPE} STREQUAL SHARED) + # Build samples +- add_subdirectory(samples) ++ # add_subdirectory(samples) + + # Build tests +- add_subdirectory(tests-v2) ++ # add_subdirectory(tests-v2) + endif() + + # Build Plugins + add_subdirectory(plugin) + + # Build tests +-add_subdirectory(${TEST_DIR} ${PROJECT_BINARY_DIR}/test) ++# add_subdirectory(${TEST_DIR} ${PROJECT_BINARY_DIR}/test) + + # Installation and packaging + set(DEST_NAME ${ROCPROFILER_NAME}) +@@ -236,24 +236,6 @@ install( + DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME} + COMPONENT runtime) + +-# librocprof-tool.so +-install( +- FILES ${PROJECT_BINARY_DIR}/test/librocprof-tool.so +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME} +- COMPONENT runtime) +- +-install( +- FILES ${PROJECT_BINARY_DIR}/test/librocprof-tool.so +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME} +- COMPONENT asan) +- +-install( +- FILES ${PROJECT_BINARY_DIR}/test/rocprof-ctrl +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME} +- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ +- WORLD_EXECUTE +- COMPONENT runtime) +- + # File reorg backward compatibility for non ASAN packaging + if(NOT ENABLE_ASAN_PACKAGING) + # File reorg Backward compatibility diff --git a/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests.patch b/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests.patch new file mode 100644 index 0000000000..8ff9eebe3e --- /dev/null +++ b/var/spack/repos/builtin/packages/rocprofiler-dev/0002-add-fPIC-and-disable-tests.patch @@ -0,0 +1,69 @@ +From d8a55fe10f0f88087d67a9d7bb1fce47fda8d86f Mon Sep 17 00:00:00 2001 +From: Afzal Patel +Date: Thu, 1 Feb 2024 18:06:40 +0000 +Subject: [PATCH] Disable tests and add fPIC compile option + +--- + CMakeLists.txt | 27 ++++----------------------- + 1 file changed, 4 insertions(+), 23 deletions(-) + +diff git a/CMakeLists.txt b/CMakeLists.txt +index 99fb394..63e65ca 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,7 @@ endif() + + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) +-add_compile_options(-Wall) ++add_compile_options(-Wall -fPIC) + + set(THREADS_PREFER_PTHREAD_FLAG ON) + +@@ -162,17 +162,17 @@ add_subdirectory(src) + + if(${LIBRARY_TYPE} STREQUAL SHARED) + # Build samples +- add_subdirectory(samples) ++ # add_subdirectory(samples) + + # Build tests +- add_subdirectory(tests) ++ # add_subdirectory(tests) + endif() + + # Build Plugins + add_subdirectory(plugin) + + # Build tests +-add_subdirectory(${TEST_DIR} ${PROJECT_BINARY_DIR}/test) ++# add_subdirectory(${TEST_DIR} ${PROJECT_BINARY_DIR}/test) + + # Installation and packaging + set(DEST_NAME ${ROCPROFILER_NAME}) +@@ -238,25 +238,6 @@ install( + DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME} + COMPONENT runtime) + +-# librocprof-tool.so +-install( +- FILES ${PROJECT_BINARY_DIR}/test/librocprof-tool.so +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME} +- COMPONENT runtime) +- +-install( +- FILES ${PROJECT_BINARY_DIR}/test/rocprof-ctrl +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/${ROCPROFILER_NAME} +- PERMISSIONS +- OWNER_READ +- OWNER_WRITE +- OWNER_EXECUTE +- GROUP_READ +- GROUP_EXECUTE +- WORLD_READ +- WORLD_EXECUTE +- COMPONENT runtime) +- + # File reorg Backward compatibility + option(FILE_REORG_BACKWARD_COMPATIBILITY + "Enable File Reorg with backward compatibility" ON) diff --git a/var/spack/repos/builtin/packages/rocprofiler-dev/0003-disable-tests.patch b/var/spack/repos/builtin/packages/rocprofiler-dev/0003-disable-tests.patch new file mode 100644 index 0000000000..51a92ccfd1 --- /dev/null +++ b/var/spack/repos/builtin/packages/rocprofiler-dev/0003-disable-tests.patch @@ -0,0 +1,24 @@ +From 869c2dc4b88aa5beb5ab0e57aba85d0c520e7074 Mon Sep 17 00:00:00 2001 +From: Afzal Patel +Date: Fri, 2 Feb 2024 14:16:12 +0000 +Subject: [PATCH] Disable tests + +--- + CMakeLists.txt | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9d52082..6f35926 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -176,8 +176,8 @@ endif() + enable_testing() + + # Temporarily for CI to work +-set(ROCPROFILER_BUILD_TESTS ON) +-set(ROCPROFILER_BUILD_CI ON) ++set(ROCPROFILER_BUILD_TESTS OFF) ++set(ROCPROFILER_BUILD_CI OFF) + + if(ROCPROFILER_BUILD_CI) + include(CTest) diff --git a/var/spack/repos/builtin/packages/rocprofiler-dev/package.py b/var/spack/repos/builtin/packages/rocprofiler-dev/package.py index 18150254dc..48bf0e4cea 100644 --- a/var/spack/repos/builtin/packages/rocprofiler-dev/package.py +++ b/var/spack/repos/builtin/packages/rocprofiler-dev/package.py @@ -13,12 +13,20 @@ class RocprofilerDev(CMakePackage): homepage = "https://github.com/ROCm/rocprofiler" git = "https://github.com/ROCm/rocprofiler.git" - url = "https://github.com/ROCm/rocprofiler/archive/refs/tags/rocm-5.4.3.tar.gz" + url = "https://github.com/ROCm/rocprofiler/archive/refs/tags/rocm-6.0.0.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") libraries = ["librocprofiler64"] license("MIT") + version("6.0.2", sha256="d3f24e639a5e151fa418a92ae6fe150bdf14120b8982a5baa52844ce2fba0b82") + version("6.0.0", sha256="6aca327a6ba302b5957002e55ac640dd185d51a354da3859e957448a5fc36b14") + version("5.7.1", sha256="2fb7158592d89312ba419a272d907d8849373c0a676a83dd03c32b9942dfd27a") + version("5.7.0", sha256="003af33db5585e71823b2b58618d795df926f6bd25943f2add388db23f2bf377") + version("5.6.1", sha256="3e5eecce216418e61ffee893cbc8611e38305ee472d0e10d579eb74e287c8e1b") + version("5.6.0", sha256="ff811bd91580f60b6b4d397b6fce38d96f07debc6fd8a631b81d1b266cc9542d") + version("5.5.1", sha256="f5dbece5c205e37383fed4a2bd6042ff1c11f11f64dfbf65d7e23c0af6889a5a") + version("5.5.0", sha256="d9dd38c42b4b12d4149f1cc3fca1af5bec69c72f455653a8f4fd8195b3b95703") version("5.4.3", sha256="86c3f43ee6cb9808796a21409c853cc8fd496578b9eef4de67ca77830229cac1") version("5.4.0", sha256="0322cbe5d1d3182e616f472da31f0707ad6040833c38c28f2b39381a85210f43") version("5.3.3", sha256="07ee28f3420a07fc9d45910e78ad7961b388109cfc0e74cfdf2666789e6af171") @@ -31,15 +39,57 @@ class RocprofilerDev(CMakePackage): version("5.1.0", sha256="4a1c6ed887b0159392406af8796508df2794353a4c3aacc801116044fb4a10a5") depends_on("cmake@3:", type="build") - for ver in ["5.1.0", "5.1.3", "5.2.0", "5.2.1", "5.2.3", "5.3.0", "5.3.3", "5.4.0", "5.4.3"]: + for ver in [ + "5.1.0", + "5.1.3", + "5.2.0", + "5.2.1", + "5.2.3", + "5.3.0", + "5.3.3", + "5.4.0", + "5.4.3", + "5.5.0", + "5.5.1", + "5.6.0", + "5.6.1", + "5.7.0", + "5.7.1", + "6.0.0", + "6.0.2", + ]: depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}") depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}") depends_on(f"rocminfo@{ver}", when=f"@{ver}") depends_on(f"roctracer-dev-api@{ver}", when=f"@{ver}") + for ver in ["5.7.0", "5.7.1", "6.0.0", "6.0.2"]: + depends_on(f"hip@{ver}", when=f"@{ver}") + depends_on(f"rocm-smi-lib@{ver}", when=f"@{ver}") + + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]: + depends_on(f"aqlprofile@{ver}", when=f"@{ver}") + depends_on(f"comgr@{ver}", when=f"@{ver}") + + depends_on("numactl", type="link", when="@4.3.1") + depends_on("py-lxml", when="@5.5:") + depends_on("py-cppheaderparser", when="@5.5:") + depends_on("googletest@1.10.0:", when="@5.5:") + depends_on("py-pyyaml", when="@5.5:") + depends_on("py-barectf", when="@5.5:") + depends_on("py-setuptools", when="@5.5:") + depends_on("py-jsonschema", when="@5.5:") + depends_on("py-jinja2", when="@5.5:") + depends_on("py-termcolor", when="@5.5:") + depends_on("py-pandas", when="@6.0:") + # See https://github.com/ROCm/rocprofiler/pull/50 - patch("fix-includes.patch") - patch("0001-Continue-build-in-absence-of-aql-profile-lib.patch", when="@5.3:") + patch("fix-includes.patch", when="@:5.4") + patch("0001-Continue-build-in-absence-of-aql-profile-lib.patch", when="@5.3:5.4") + patch("0002-add-fPIC-and-disable-tests.patch", when="@5.5") + patch("0002-add-fPIC-and-disable-tests-5.6.patch", when="@5.6") + patch("0002-add-fPIC-and-disable-tests-5.7.patch", when="@5.7") + patch("0003-disable-tests.patch", when="@6.0") def patch(self): filter_file( @@ -65,4 +115,11 @@ def cmake_args(self): "PROF_API_HEADER_PATH", self.spec["roctracer-dev-api"].prefix.roctracer.include.ext ), self.define("ROCM_ROOT_DIR", self.spec["hsakmt-roct"].prefix.include), + self.define("CMAKE_INSTALL_LIBDIR", "lib"), ] + + @run_after("install") + def post_install(self): + if self.spec.satisfies("@6.0:"): + install_tree(self.prefix.include.rocprofiler, self.prefix.rocprofiler.include) + install_tree(self.prefix.lib, self.prefix.rocprofiler.lib) diff --git a/var/spack/repos/builtin/packages/roctracer-dev/package.py b/var/spack/repos/builtin/packages/roctracer-dev/package.py index 18e3da449b..662ca46a9b 100644 --- a/var/spack/repos/builtin/packages/roctracer-dev/package.py +++ b/var/spack/repos/builtin/packages/roctracer-dev/package.py @@ -120,3 +120,9 @@ def cmake_args(self): args.append("-DCMAKE_INSTALL_LIBDIR=lib") return args + + @run_after("install") + def post_install(self): + if self.spec.satisfies("@6.0:"): + install_tree(self.prefix.include.roctracer, self.prefix.roctracer.include) + install_tree(self.prefix.lib, self.prefix.roctracer.lib)