|
| 1 | +:orphan: |
| 2 | + |
| 3 | +.. meta:: |
| 4 | + :description: Install the relocatable TransferBench TGZ archive on any Linux distribution |
| 5 | + :keywords: TransferBench, TGZ, tarball, install, relocatable |
| 6 | + |
| 7 | +.. _install-transferbench-tgz: |
| 8 | + |
| 9 | +------------------------------------------------ |
| 10 | +Installing TransferBench from the TGZ archive |
| 11 | +------------------------------------------------ |
| 12 | + |
| 13 | +The TransferBench TGZ archive (``amdrocm<MAJOR>-transferbench-*.tar.gz``) is a |
| 14 | +relocatable install tree that works on any Linux distribution where a |
| 15 | +compatible ROCm runtime is already present. Use it when you cannot or do not |
| 16 | +want to install the DEB or RPM package — for example on a distribution |
| 17 | +without a native ROCm package, or inside a non-root container. |
| 18 | + |
| 19 | +The TGZ ships only the ``TransferBench`` binary and its supporting files. It |
| 20 | +does **not** bundle ROCm; the host system must already provide the ROCm |
| 21 | +runtime libraries (``hsa-rocr`` and the HIP runtime). |
| 22 | + |
| 23 | +Pre-install: ROCm |
| 24 | +----------------- |
| 25 | + |
| 26 | +Install ROCm on the target system before extracting the TGZ. Follow the |
| 27 | +official AMD documentation: |
| 28 | + |
| 29 | +* `ROCm documentation <https://rocm.docs.amd.com/>`_ |
| 30 | +* `Linux install guide <https://rocm.docs.amd.com/projects/install-on-linux/en/latest/>`_ |
| 31 | + |
| 32 | +After installing, ``ROCM_PATH`` (typically ``/opt/rocm``) must be set |
| 33 | +correctly and the ROCm libraries must be loadable by the dynamic linker. |
| 34 | + |
| 35 | +Install runtime dependencies |
| 36 | +---------------------------- |
| 37 | + |
| 38 | +The DEB and RPM packages declare these runtime dependencies; TGZ users must |
| 39 | +install them manually on the target host. |
| 40 | + |
| 41 | +.. list-table:: |
| 42 | + :header-rows: 1 |
| 43 | + :widths: 30 70 |
| 44 | + |
| 45 | + * - Family |
| 46 | + - Required packages |
| 47 | + * - Debian / Ubuntu |
| 48 | + - ``numactl``, ``libnuma1``, plus the ROCm runtime (``hsa-rocr``) |
| 49 | + * - RHEL / Rocky / AlmaLinux |
| 50 | + - ``numactl``, plus the ROCm runtime (``hsa-rocr``) |
| 51 | + |
| 52 | +Install commands: |
| 53 | + |
| 54 | +.. code-block:: bash |
| 55 | +
|
| 56 | + # Ubuntu / Debian |
| 57 | + sudo apt update && sudo apt install -y numactl libnuma1 |
| 58 | +
|
| 59 | + # RHEL / Rocky / AlmaLinux |
| 60 | + sudo dnf install -y numactl |
| 61 | +
|
| 62 | +The ROCm packages (``hsa-rocr`` and friends) come from the ROCm repo |
| 63 | +configured in the pre-install step above. |
| 64 | + |
| 65 | +Extract the TGZ |
| 66 | +--------------- |
| 67 | + |
| 68 | +Extract the archive into ``/opt/rocm/extras-<MAJOR>``, where ``<MAJOR>`` is |
| 69 | +the ROCm major version the package was built against (encoded in the package |
| 70 | +name, for example ``amdrocm7-transferbench-*.tar.gz`` → major ``7``). |
| 71 | + |
| 72 | +.. code-block:: bash |
| 73 | +
|
| 74 | + # Example for ROCm major 7 — match your package |
| 75 | + sudo mkdir -p /opt/rocm/extras-7 |
| 76 | + sudo tar -xzf amdrocm7-transferbench-*.tar.gz -C /opt/rocm/extras-7 --strip-components=1 |
| 77 | +
|
| 78 | +The ``--strip-components=1`` option discards the top-level directory inside |
| 79 | +the tarball so files land directly under ``/opt/rocm/extras-7/{bin,lib,...}``. |
| 80 | + |
| 81 | +Configure ``PATH`` and ``LD_LIBRARY_PATH`` |
| 82 | +------------------------------------------ |
| 83 | + |
| 84 | +Point the shell at the extracted prefix and your ROCm install. Copy and paste |
| 85 | +the block as one unit (replace paths with your real ``ROCM_PATH`` and major |
| 86 | +version): |
| 87 | + |
| 88 | +.. code-block:: bash |
| 89 | +
|
| 90 | + export ROCM_PATH=/opt/rocm # or your real ROCm root |
| 91 | + export PATH=/opt/rocm/extras-7/bin:$ROCM_PATH/bin:$PATH |
| 92 | + export LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:$ROCM_PATH/lib:$ROCM_PATH/lib/llvm/lib:$LD_LIBRARY_PATH |
| 93 | +
|
| 94 | +The ``TransferBench`` binary embeds an ``RPATH`` covering ``$ORIGIN``, |
| 95 | +``$ORIGIN/../lib``, ``/opt/rocm/extras-<MAJOR>/lib``, ``/opt/rocm/lib``, |
| 96 | +``/opt/rocm/lib/llvm/lib``, ``/opt/rocm/core-<MAJOR>/lib``, and |
| 97 | +``/opt/rocm/core-<MAJOR>/lib/llvm/lib``. The ``LD_LIBRARY_PATH`` export above |
| 98 | +is mainly defensive — useful if your ROCm tree lives somewhere non-standard |
| 99 | +or if you want to override which copy of a library is loaded for |
| 100 | +troubleshooting. |
| 101 | + |
| 102 | +Verify the install |
| 103 | +------------------ |
| 104 | + |
| 105 | +.. code-block:: bash |
| 106 | +
|
| 107 | + TransferBench |
| 108 | +
|
| 109 | +Run with no arguments, ``TransferBench`` prints its version, usage, the |
| 110 | +list of available preset benchmarks, and the detected GPU/CPU topology, |
| 111 | +then exits. Seeing that output confirms the binary loaded its ROCm |
| 112 | +libraries correctly. |
| 113 | + |
| 114 | +If the binary fails to load a shared library, inspect: |
| 115 | + |
| 116 | +.. code-block:: bash |
| 117 | +
|
| 118 | + ldd /opt/rocm/extras-7/bin/TransferBench |
| 119 | + readelf -d /opt/rocm/extras-7/bin/TransferBench | grep -E 'RPATH|RUNPATH' |
| 120 | +
|
| 121 | +Make a persistent shell setup |
| 122 | +----------------------------- |
| 123 | + |
| 124 | +To avoid re-exporting every shell, drop the variables into a profile script: |
| 125 | + |
| 126 | +.. code-block:: bash |
| 127 | +
|
| 128 | + sudo tee /etc/profile.d/transferbench.sh >/dev/null <<'EOF' |
| 129 | + export ROCM_PATH=/opt/rocm |
| 130 | + export PATH=/opt/rocm/extras-7/bin:$ROCM_PATH/bin:$PATH |
| 131 | + export LD_LIBRARY_PATH=/opt/rocm/extras-7/lib:$ROCM_PATH/lib:$ROCM_PATH/lib/llvm/lib:$LD_LIBRARY_PATH |
| 132 | + EOF |
| 133 | + sudo chmod 0644 /etc/profile.d/transferbench.sh |
| 134 | +
|
| 135 | +Log out and back in (or ``source /etc/profile.d/transferbench.sh``) for the |
| 136 | +changes to apply. |
0 commit comments