Files
rocm-systems/rocclr
German Andryeyev d17108e8d0 SWDEV-303560 - Remove coarse grain setup by default
The original logic was left after initial testing when HMM
couldn't handle xnack properly

Change-Id: I0abf01805704171e931dfba8b6d95bfe87d5fab1
2021-10-05 17:20:59 -04:00
..
2021-09-09 10:16:14 -04:00
2020-02-18 11:09:50 -05:00

ROCclr - Radeon Open Compute Common Language Runtime

ROCclr is a virtual device interface that compute runtimes interact with to different backends such as ROCr or PAL This abstraction allows runtimes to work on Windows as well as on Linux without much effort.

DISCLAIMER

The information contained herein is for informational purposes only, and is subject to change without notice. In addition, any stated support is planned and is also subject to change. While every precaution has been taken in the preparation of this document, it may contain technical inaccuracies, omissions and typographical errors, and AMD is under no obligation to update or otherwise correct this information. Advanced Micro Devices, Inc. makes no representations or warranties with respect to the accuracy or completeness of the contents of this document, and assumes no liability of any kind, including the implied warranties of noninfringement, merchantability or fitness for particular purposes, with respect to the operation or use of AMD hardware, software or other products described herein. No license, including implied or arising by estoppel, to any intellectual property rights is granted by this document. Terms and limitations applicable to the purchase or use of AMDs products are as set forth in a signed agreement between the parties or in AMD's Standard Terms and Conditions of Sale.

© 2020 Advanced Micro Devices, Inc. All Rights Reserved.

Repository branches

The repository maintains several branches. The branches that are of importance are:

  • Main branch: This is the stable branch. It is up to date with the latest release branch, for example, if the latest ROCM release is rocm-4.1.x, main branch will be the repository based on this release.
  • Develop branch: This is the default branch, on which the new features are still under development and visible. While this maybe of interest to many, it should be noted that this branch and the features under development might not be stable.
  • Release branches. These are branches corresponding to each ROCM release, listed with release tags, such as rocm-4.0.x, rocm-4.1.x, etc.

Building

Prerequisites

Getting the source code

git clone -b main https://github.com/ROCm-Developer-Tools/ROCclr.git
git clone -b main https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git

Set the environment variables

export ROCclr_DIR="$(readlink -f ROCclr)"
export OPENCL_DIR="$(readlink -f ROCm-OpenCL-Runtime)"

Build ROCclr

Here is command to build ROCclr:

cd "$ROCclr_DIR"
mkdir -p build; cd build
cmake -DOPENCL_DIR="$OPENCL_DIR" -DCMAKE_INSTALL_PREFIX=/opt/rocm/rocclr ..
make -j$(nproc)
sudo make install

Optional steps to build HIP runtime

Enter the directory where git cloned the ROCClr and OpenCL. Run the following commands:

git clone -b main https://github.com/ROCm-Developer-Tools/HIP.git
export HIP_DIR="$(readlink -f HIP)"
cd "$HIP_DIR"
mkdir -p build; cd build
cmake -DCMAKE_PREFIX_PATH="$ROCclr_DIR/build;/opt/rocm/" ..
make -j$(nproc)

Release build

For release build, add "-DCMAKE_BUILD_TYPE=Release" to the cmake command line.