
.. meta::
  :description: ROCm Bandwidth Test is a ROCm application for reporting system information
  :keywords: Install ROCm Bandwidth Test, Build ROCm Bandwidth Test, Install RBT, Build RBT

.. _installing-rbt:

Installing ROCm Bandwidth Test
-----------------------------------

This topic provides information required to build and install RBT.

Build
=======

Here are the steps to build RBT:

  1. Create a build directory in the project folder - ``rocm_bandwidth_test``.

  .. code-block:: shell

    mkdir ./build

  2. Set working directory to the new build directory.

  .. code-block:: shell

    cd ./build

  3. Invoke ``Cmake`` to interpret build rules and generate native build files. Provide the RBT test suite as the argument for ``Cmake``.

  .. code-block:: shell

    # Assume that ROCR Runtime has its libraries & headers are located in the path :
    # libraries : _ABSOLUTE_PATH_TO_ROCR_LIBS_/lib
    # headers   : _ABSOLUTE_PATH_TO_ROCR_LIBS_/include/hsa
    # Note : Observe that both include & lib folder are under common path (_ABSOLUTE_PATH_TO_ROCR_LIBS_)

    # Builds Debug version
    # Assumes pwd is _ABSOLUTE_PATH_TO_RBT/rocm_bandwidth_test/build

    cmake -DCMAKE_BUILD_TYPE="Debug"   \
        -DCMAKE_MODULE_PATH="_ABSOLUTE_PATH_TO_RBT/rocm_bandwidth_test/cmake_modules"  \
        -DCMAKE_PREFIX_PATH="_ABSOLUTE_PATH_TO_ROCR_LIBS_"
        ..

    # Builds Release version - default
    # Assumes pwd is _ABSOLUTE_PATH_TO_RBT/rocm_bandwidth_test/build
    cmake -DCMAKE_MODULE_PATH="_ABSOLUTE_PATH_TO_RBT/rocm_bandwidth_test/cmake_modules"  \
        -DCMAKE_PREFIX_PATH="_ABSOLUTE_PATH_TO_ROCR_LIBS_"

  4. Invoke the native build rules generated by ``Cmake`` to build the various objects, library, and executable files.

  .. code-block:: shell

    make

.. note::

You can build RBT from source available at `GitHub <https://github.com/ROCm/rocm_bandwidth_test>`_. The access to source is currently limited to approved users. To request permission, file a ticket `here. <https://github.com/ROCm/ROCm/issues/new/choose>`_

Install
=========

Invoke the ``install`` command to copy build artifacts to predefined folders of the RBT suite. Upon completion, the artifacts are copied to the ``bin`` and ``lib`` directories of the build directory.

.. code-block:: shell

    make install

.. note::

    You can find all executables in the ``<build_directory>``.
