Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
neon60 committed May 25, 2024
1 parent 82b0080 commit 649a200
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
30 changes: 15 additions & 15 deletions docs/install/build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ Before building and running HIP, make sure drivers and prebuilt packages are ins
You also need to install Python 3, which includes the ``CppHeaderParser`` package.
Install Python 3 using the following command:

.. code:: shell
.. code-block:: shell
apt-get install python3
Check and install ``CppHeaderParser`` package using the command:

.. code:: shell
.. code-block:: shell
pip3 install CppHeaderParser
Expand All @@ -29,7 +29,7 @@ Building the HIP runtime

Set the repository branch using the variable: ``ROCM_BRANCH``. For example, for ROCm 6.1, use:

.. code:: shell
.. code-block:: shell
export ROCM_BRANCH=rocm-6.1.x
Expand All @@ -49,7 +49,7 @@ Set the repository branch using the variable: ``ROCM_BRANCH``. For example, for
``hipother`` provides files required to support the HIP back-end implementation on some non-AMD platforms,
like NVIDIA.

.. code:: shell
.. code-block:: shell
git clone -b "$ROCM_BRANCH" https://github.com/ROCm/clr.git
git clone -b "$ROCM_BRANCH" https://github.com/ROCm/hip.git
Expand All @@ -66,15 +66,15 @@ Set the repository branch using the variable: ``ROCM_BRANCH``. For example, for

#. Set the environment variables.

.. code:: shell
.. code-block:: shell
export CLR_DIR="$(readlink -f clr)"
export HIP_DIR="$(readlink -f hip)"
#. Build HIP.

.. code:: shell
.. code-block:: shell
cd "$CLR_DIR"
mkdir -p build; cd build
Expand Down Expand Up @@ -116,7 +116,7 @@ Set the repository branch using the variable: ``ROCM_BRANCH``. For example, for

Usage:

.. code:: shell
.. code-block:: shell
`hip_prof_gen.py [-v] <input HIP API .h file> <patched srcs path> <previous output> [<output>]`
Expand All @@ -131,7 +131,7 @@ Set the repository branch using the variable: ``ROCM_BRANCH``. For example, for

Example usage:

.. code:: shell
.. code-block:: shell
hip_prof_gen.py -v -p -t --priv <hip>/include/hip/hip_runtime_api.h \
<hipamd>/src <hipamd>/include/hip/amd_detail/hip_prof_str.h \
Expand All @@ -142,23 +142,23 @@ Set the repository branch using the variable: ``ROCM_BRANCH``. For example, for

#. Get the HIP source code.

.. code:: shell
.. code-block:: shell
git clone -b "$ROCM_BRANCH" https://github.com/ROCm/clr.git
git clone -b "$ROCM_BRANCH" https://github.com/ROCm/hip.git
git clone -b "$ROCM_BRANCH" https://github.com/ROCm/hipother.git
#. Set the environment variables.

.. code:: shell
.. code-block:: shell
export CLR_DIR="$(readlink -f clr)"
export HIP_DIR="$(readlink -f hip)"
export HIP_OTHER="$(readlink -f hipother)"
#. Build HIP.

.. code:: shell
.. code-block:: shell
cd "$CLR_DIR"
mkdir -p build; cd build
Expand All @@ -180,13 +180,13 @@ Build HIP tests

* Get HIP tests source code.

.. code:: shell
.. code-block:: shell
git clone -b "$ROCM_BRANCH" https://github.com/ROCm/hip-tests.git
* Build HIP tests from source.

.. code:: shell
.. code-block:: shell
export HIPTESTS_DIR="$(readlink -f hip-tests)"
cd "$HIPTESTS_DIR"
Expand All @@ -199,14 +199,14 @@ Build HIP tests

To run any single catch test, use this example:

.. code:: shell
.. code-block:: shell
cd $HIPTESTS_DIR/build/catch_tests/unit/texture
./TextureTest
* Build a HIP Catch2 standalone test.

.. code:: shell
.. code-block:: shell
cd "$HIPTESTS_DIR"
hipcc $HIPTESTS_DIR/catch/unit/memory/hipPointerGetAttributes.cc \
Expand Down
6 changes: 3 additions & 3 deletions docs/install/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Installation

#. Install the NVIDIA driver.

.. code:: shell
.. code-block:: shell
sudo apt-get install ubuntu-drivers-common && sudo ubuntu-drivers autoinstall
sudo reboot
Expand All @@ -59,7 +59,7 @@ Installation
#. Install the ``hip-runtime-nvidia`` and ``hip-dev`` packages. This installs the CUDA SDK and HIP
porting layer.

.. code:: shell
.. code-block:: shell
apt-get install hip-runtime-nvidia hip-dev
Expand All @@ -74,6 +74,6 @@ Verify your installation

Run ``hipconfig`` in your installation path.

.. code:: shell
.. code-block:: shell
/opt/rocm/bin/hipconfig --full

0 comments on commit 649a200

Please sign in to comment.