RDC installation#

RDC is part of the AMD ROCm software and available on the distributions supported by AMD ROCm. This topic provides information required to install RDC from prebuilt packages and source.

Prerequisites#

To install RDC from source, ensure that your system meets the following requirements:

Build RDC from source#

The following sections provide steps to build RDC from source.

Build gRPC and Protoc#

gRPC and Protoc must be built from source as the prebuilt packages are not available for the same. Here are the steps:

  1. Install the required tools:

    sudo apt-get update
    sudo apt-get install automake make g++ unzip build-essential autoconf libtool pkg-config libgflags-dev libgtest-dev clang libc++-dev curl
    
  2. Clone and build gRPC:

    git clone -b v1.61.0 https://github.com/grpc/grpc --depth=1 --shallow-submodules --recurse-submodules
    cd grpc
    export GRPC_ROOT=/opt/grpc
    cmake -B build \
        -DgRPC_INSTALL=ON \
        -DgRPC_BUILD_TESTS=OFF \
        -DBUILD_SHARED_LIBS=ON \
        -DCMAKE_INSTALL_PREFIX="$GRPC_ROOT" \
        -DCMAKE_INSTALL_LIBDIR=lib \
        -DCMAKE_BUILD_TYPE=Release
    make -C build -j $(nproc)
    sudo make -C build install
    echo "$GRPC_ROOT" | sudo tee /etc/ld.so.conf.d/grpc.conf
    sudo ldconfig
    cd ..
    

Build RDC#

  1. Clone the RDC repository:

    git clone https://github.com/ROCm/rdc
    cd rdc
    
  2. Configure the build:

    cmake -B build -DGRPC_ROOT="$GRPC_ROOT"
    
  3. You can also enable the following optional features:

    • ROCm profiler:

      cmake -B build -DBUILD_PROFILER=ON
      
    • ROCm Validation Suite (RVS):

      cmake -B build -DBUILD_RVS=ON
      
    • RDC library only (without rdci and rdcd):

      cmake -B build -DBUILD_STANDALONE=OFF
      
    • RDC library without ROCm runtime:

      cmake -B build -DBUILD_RUNTIME=OFF
      
  4. Build and install:

    make -C build -j $(nproc)
    sudo make -C build install
    
  5. Update system library path:

    export RDC_LIB_DIR=/opt/rocm/lib/rdc
    export GRPC_LIB_DIR="/opt/grpc/lib"
    echo "${RDC_LIB_DIR}" | sudo tee /etc/ld.so.conf.d/x86_64-librdc_client.conf
    echo "${GRPC_LIB_DIR}" | sudo tee -a /etc/ld.so.conf.d/x86_64-librdc_client.conf
    sudo ldconfig
    

Installing RDC using prebuilt packages#

RDC is packaged as part of the ROCm software repository. To install RDC using prebuilt package, first install the AMD ROCm software, then use the following instructions:

$ sudo apt-get install rdc
# or, to install a specific version
$ sudo apt-get install rdc<x.y.z>
$ sudo zypper install rdc
# or, to install a specific version
$ sudo zypper install rdc<x.y.z>