Skip to content

Commit

Permalink
add more rocm development and tracing tools
Browse files Browse the repository at this point in the history
- amdsmi
- rocdbgapi
- rocgdb
- nvtop

fixes #106

Signed-off-by: Mika Laitio <[email protected]>
  • Loading branch information
lamikr committed Jul 14, 2024
1 parent 2683f62 commit 1b4442a
Show file tree
Hide file tree
Showing 11 changed files with 109 additions and 7 deletions.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions binfo/012_01_rocdbgapi.binfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
BINFO_APP_NAME=rocdbgapi
BINFO_APP_SRC_SUBDIR_BASENAME=
BINFO_APP_SRC_TOPDIR_BASENAME=${BINFO_APP_NAME}
BINFO_APP_SRC_DIR="${SDK_SRC_ROOT_DIR}/${BINFO_APP_SRC_TOPDIR_BASENAME}"
BINFO_APP_UPSTREAM_REPO_URL=https://github.com/ROCm/ROCdbgapi.git
#use default git tag
#BINFO_APP_UPSTREAM_REPO_VERSION_TAG=amd-staging

BINFO_APP_CMAKE_CFG="-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR_PREFIX_SDK_ROOT}"
BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} -DCMAKE_PREFIX_PATH=${INSTALL_DIR_PREFIX_SDK_ROOT}/lib64/cmake;${INSTALL_DIR_PREFIX_SDK_ROOT}/lib/cmake"
BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} ${BINFO_APP_SRC_DIR}"
13 changes: 13 additions & 0 deletions binfo/012_02_rocgdb.binfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
BINFO_APP_NAME=rocgdb
BINFO_APP_SRC_SUBDIR_BASENAME=
BINFO_APP_SRC_TOPDIR_BASENAME=${BINFO_APP_NAME}
BINFO_APP_SRC_DIR="${SDK_SRC_ROOT_DIR}/${BINFO_APP_SRC_TOPDIR_BASENAME}"
BINFO_APP_UPSTREAM_REPO_URL=https://github.com/ROCm/ROCgdb.git
#use default git tag
#BINFO_APP_UPSTREAM_REPO_VERSION_TAG=amd-staging

BINFO_APP_CONFIG_CMD_ARRAY=(
"cd ${BINFO_APP_BUILD_DIR}"
"export PKG_CONFIG_PATH=${INSTALL_DIR_PREFIX_SDK_ROOT}/share/pkgconfig:${INSTALL_DIR_PREFIX_SDK_ROOT}/lib64/pkgconfig:${INSTALL_DIR_PREFIX_SDK_ROOT}/lib/pkgconfig"
"${BINFO_APP_SRC_DIR}/configure --prefix=${INSTALL_DIR_PREFIX_SDK_ROOT} --program-prefix=roc --with-rocm-dbgapi=${INSTALL_DIR_PREFIX_SDK_ROOT} --enable-64-bit-bfd --enable-targets="x86_64-linux-gnu,amdgcn-amd-amdhsa" --disable-ld --disable-gas --disable-gdbserver --disable-sim --enable-tui --disable-gdbtk --disable-gprofng --disable-shared --with-expat --with-system-zlib --without-guile --with-babeltrace --with-lzma --with-python=python3"
)
File renamed without changes.
10 changes: 10 additions & 0 deletions binfo/013_02_amdsmi.binfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
BINFO_APP_NAME=amdsmi
BINFO_APP_SRC_SUBDIR_BASENAME=
BINFO_APP_SRC_TOPDIR_BASENAME=${BINFO_APP_NAME}
BINFO_APP_SRC_DIR="${SDK_SRC_ROOT_DIR}/${BINFO_APP_SRC_TOPDIR_BASENAME}"
BINFO_APP_UPSTREAM_REPO_URL=https://github.com/ROCm/amdsmi.git
#use default git tag
#BINFO_APP_UPSTREAM_REPO_VERSION_TAG=amd-staging

BINFO_APP_CMAKE_CFG="-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR_PREFIX_SDK_ROOT}"
BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} ${BINFO_APP_SRC_DIR}"
13 changes: 13 additions & 0 deletions binfo/013_03_nvtop.binfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
BINFO_APP_NAME=nvtop
BINFO_APP_SRC_SUBDIR_BASENAME=
BINFO_APP_SRC_TOPDIR_BASENAME=${BINFO_APP_NAME}
BINFO_APP_SRC_DIR="${SDK_SRC_ROOT_DIR}/${BINFO_APP_SRC_TOPDIR_BASENAME}"
BINFO_APP_UPSTREAM_REPO_URL=https://github.com/Syllo/nvtop.git
#use default git tag
BINFO_APP_UPSTREAM_REPO_VERSION_TAG=0316ce19581c3d8543cf6aa312d1569c56ca754f

BINFO_APP_CMAKE_CFG="-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR_PREFIX_SDK_ROOT}"
BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} -DAMDGPU_SUPPORT=ON"
BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} -DINTEL_SUPPORT=ON"
BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} -DNVIDIA_SUPPORT=ON "
BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} ${BINFO_APP_SRC_DIR}"
10 changes: 7 additions & 3 deletions binfo/binfo_list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ LIST_BINFO_FILE_BASENAME=(
"009_04_hipcc_clr.binfo"
"010_01_rocPRIM.binfo"
"010_02_rocthrust.binfo"
"011_rocprofiler.binfo"
"012_roctracer.binfo"
"013_rocm_smi_lib.binfo"
"011_01_rocprofiler.binfo"
"011_02_roctracer.binfo"
"012_01_rocdbgapi.binfo"
"012_02_rocgdb.binfo"
"013_01_rocm_smi_lib.binfo"
"013_02_amdsmi.binfo"
"013_03_nvtop.binfo"
"014_01_hwloc.binfo"
"014_02_boost.binfo"
"014_03_gtest.binfo"
Expand Down
8 changes: 4 additions & 4 deletions install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ func_install_packages()
{
case "${ID}" in
mageia)
sudo urpmi cmake rpm-build gcc gcc-c++ gcc-c++-x86_64-linux-gnu lld golang libstdc++-static-devel openssl-devel zlib-devel gcc-gfortran make fftw-devel wget libdrm-devel glew-devel autoconf automake libtool icu bzip2-devel perl-base python-pip python-wheel python3-numpy python3-wheel python3-mock python3-future python3-pip python3-yaml python3-setuptools numa-devel libstdc++6 libstdc++-devel valgrind-devel lib64llvm-devel lib64boost_thread1.81.0 lib64boost_math1.81.0 lib64boost-devel lib64clang15.0 python3-ply python3-joblib python3-lit lib64msgpack-devel libffi-devel json-devel texinfo git git-lfs bison flex byacc gettext xz-devel ninja-build texlive-dist opencl-devel protobuf-devel pybind11-devel lib64aio-devel gmp-devel mpfr-devel png-devel jpeg-devel lib64sox3
sudo urpmi cmake rpm-build gcc gcc-c++ gcc-c++-x86_64-linux-gnu lld golang libstdc++-static-devel openssl-devel zlib-devel gcc-gfortran make fftw-devel wget libdrm-devel glew-devel autoconf automake libtool icu bzip2-devel perl-base python-pip python-wheel python3-numpy python3-wheel python3-mock python3-future python3-pip python3-yaml python3-setuptools numa-devel libstdc++6 libstdc++-devel valgrind-devel lib64llvm-devel lib64boost_thread1.81.0 lib64boost_math1.81.0 lib64boost-devel lib64clang15.0 python3-ply python3-joblib python3-lit lib64msgpack-devel libffi-devel json-devel texinfo git git-lfs bison flex byacc gettext xz-devel ninja-build texlive-dist opencl-devel protobuf-devel pybind11-devel lib64aio-devel gmp-devel mpfr-devel png-devel jpeg-devel lib64sox3 ncurses-devel systemd-devel expat-devel babeltrace-devel
pip3 install --user CppHeaderParser
git-lfs install
;;
fedora)
# elevate_if_not_root dnf -y update
sudo dnf install cmake rpm-build gcc gcc-c++ openssl-devel zlib-devel gcc-gfortran make libcxx-devel numactl-libs numactl-devel dpkg-dev doxygen elfutils-libelf-devel prename perl-URI-Encode perl-File-Listing perl-File-BaseDir fftw-devel wget libdrm-devel xxd glew-devel python3-cppheaderparser autoconf automake libtool icu bzip2-devel lzma-sdk-devel libicu-devel msgpack-devel libffi-devel json-devel texinfo python3-pip sqlite-devel git git-lfs lbzip2 opencv-devel ffmpeg-free valgrind perl-FindBin pmix-devel flex-devel bison-devel bison flex byacc gettext xz-devel ninja-build texlive-scheme-small protobuf-devel pybind11-devel libaio-devel gmp-devel mpfr-devel libpng-devel libjpeg-devel sox
sudo dnf install cmake rpm-build gcc gcc-c++ openssl-devel zlib-devel gcc-gfortran make libcxx-devel numactl-libs numactl-devel dpkg-dev doxygen elfutils-libelf-devel prename perl-URI-Encode perl-File-Listing perl-File-BaseDir fftw-devel wget libdrm-devel xxd glew-devel python3-cppheaderparser autoconf automake libtool icu bzip2-devel lzma-sdk-devel libicu-devel msgpack-devel libffi-devel json-devel texinfo python3-pip sqlite-devel git git-lfs lbzip2 opencv-devel ffmpeg-free valgrind perl-FindBin pmix-devel flex-devel bison-devel bison flex byacc gettext xz-devel ninja-build texlive-scheme-small protobuf-devel pybind11-devel libaio-devel gmp-devel mpfr-devel libpng-devel libjpeg-devel sox ncurses-devel systemd-devel expat-devel libbabeltrace-devel
git-lfs install
;;
ubuntu|linuxmint)
# elevate_if_not_root apt-get update
sudo apt install gfortran make pkg-config libnuma1 cmake-curses-gui dpkg-dev rpm doxygen libelf-dev rename liburi-encode-perl libfile-basedir-perl libfile-copy-recursive-perl libfile-listing-perl build-essential wget libomp5 libomp-dev libpci3 libdrm-dev xxd libglew-dev autoconf automake libtool libbz2-dev liblzma-dev libicu-dev libfindbin-libs-perl libmsgpack-dev python3-pip libssl-dev python3-openssl libffi-dev nlohmann-json3-dev texinfo libnuma-dev cmake-extras cmake-gui sqlite3 libsqlite3-dev git git-lfs lbzip2 valgrind bison flex byacc gettext ninja-build texlive ocl-icd-opencl-dev protobuf-compiler pybind11-dev libaio-dev libgmp-dev libmpfr-dev libpng-dev libjpeg-dev sox
sudo apt install gfortran make pkg-config libnuma1 cmake-curses-gui dpkg-dev rpm doxygen libelf-dev rename liburi-encode-perl libfile-basedir-perl libfile-copy-recursive-perl libfile-listing-perl build-essential wget libomp5 libomp-dev libpci3 libdrm-dev xxd libglew-dev autoconf automake libtool libbz2-dev liblzma-dev libicu-dev libfindbin-libs-perl libmsgpack-dev python3-pip libssl-dev python3-openssl libffi-dev nlohmann-json3-dev texinfo libnuma-dev cmake-extras cmake-gui sqlite3 libsqlite3-dev git git-lfs lbzip2 valgrind bison flex byacc gettext ninja-build texlive ocl-icd-opencl-dev protobuf-compiler pybind11-dev libaio-dev libgmp-dev libmpfr-dev libpng-dev libjpeg-dev sox ncurses-dev libsystemd-dev libexpat1-dev libbabeltrace-dev
pip3 install --break-system-packages --user CppHeaderParser
res=$?
if [ $res != 0 ]; then
Expand All @@ -59,7 +59,7 @@ func_install_packages()
;;
arch|manjaro)
# elevate_if_not_root pacman -Syu
sudo pacman -S --needed gcc-libs make pkgconf numactl cmake doxygen libelf perl-rename perl-uri perl-file-basedir perl-file-copy-recursive perl-file-listing wget gcc gcc-fortran gcc-libs fakeroot openmp pciutils libdrm vim glew autoconf automake libtool bzip2 xz icu perl libmpack python-pip openssl python-pyopenssl libffi nlohmann-json texinfo extra-cmake-modules sqlite git git-lfs valgrind flex byacc gettext ninja texlive-basic ocl-icd protobuf pybind11 libaio gmp mpfr libpng libjpeg-turbo python-cppheaderparser msgpack-c msgpack-cxx sox
sudo pacman -S --needed gcc-libs make pkgconf numactl cmake doxygen libelf perl-rename perl-uri perl-file-basedir perl-file-copy-recursive perl-file-listing wget gcc gcc-fortran gcc-libs fakeroot openmp pciutils libdrm vim glew autoconf automake libtool bzip2 xz icu perl libmpack python-pip openssl python-pyopenssl libffi nlohmann-json texinfo extra-cmake-modules sqlite git git-lfs valgrind flex byacc gettext ninja texlive-basic ocl-icd protobuf pybind11 libaio gmp mpfr libpng libjpeg-turbo python-cppheaderparser msgpack-c msgpack-cxx sox ncurses expat babeltrace systemd
git-lfs install
;;
*)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 2fe70f877629bc944bf41c5deb89350989c2a5df Mon Sep 17 00:00:00 2001
From: Mika Laitio <[email protected]>
Date: Sat, 13 Jul 2024 20:06:14 -0400
Subject: [PATCH] fedora40 buildbreak fix for assignment to readonly object

Signed-off-by: Mika Laitio <[email protected]>
---
rocm_smi/include/rocm_smi/rocm_smi_utils.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rocm_smi/include/rocm_smi/rocm_smi_utils.h b/rocm_smi/include/rocm_smi/rocm_smi_utils.h
index 67d9d8b..e492978 100755
--- a/rocm_smi/include/rocm_smi/rocm_smi_utils.h
+++ b/rocm_smi/include/rocm_smi/rocm_smi_utils.h
@@ -218,7 +218,7 @@ class ScopeGuard {
__forceinline ~ScopeGuard() {
if (!dismiss_) release_();
}
- __forceinline ScopeGuard& operator=(const ScopeGuard& rhs) {
+ __forceinline ScopeGuard& operator=(ScopeGuard& rhs) {
dismiss_ = rhs.dismiss_;
release_ = rhs.release_;
rhs.dismiss_ = true;
--
2.45.2

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 306c5447546f7fefa3bf4e0503704c7650e60053 Mon Sep 17 00:00:00 2001
From: Mika Laitio <[email protected]>
Date: Fri, 12 Jul 2024 23:28:19 -0700
Subject: [PATCH] add /usr/share to pci.ids search path

Signed-off-by: Mika Laitio <[email protected]>
---
CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index cadb9c4..a2ce2c4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -116,6 +116,7 @@ find_file(
NAMES
pci.ids
PATHS
+ /usr/share
/usr/share/misc
/usr/share/hwdata
NO_DEFAULT_PATH
--
2.41.1

0 comments on commit 1b4442a

Please sign in to comment.