Files
rocm-systems/opencl
Pruthvi Madugundu b88a313eff Adding support for multiple icd files specific to ROCm version
- amdocl64.icd is renamed to amdocl64_<ROCM_PATCH_VERSION>.icd
- This will enable support for multiple icd for different versions of
  ROCm

Signed-off-by: Pruthvi Madugundu <pruthvi.madugundu@amd.com>
Change-Id: I8031b19f8579507ffb6727dedcd2e3fbb4e45de8
2020-07-09 18:04:18 -07:00
..
2020-03-06 14:01:21 -05:00
2020-04-17 14:28:24 -04:00

OpenCL™ Compatible Runtime

  • OpenCL 2.0 compatible language runtime
  • Supports offline and in-process/in-memory compilation

Getting the source code

Download the git projects using the following commands:

git clone -b master-next https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git

Repository branches

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

  • master-next: This is the default branch.

Setup OpenCL

Copy the amdocl64.icd file to /etc/OpenCL/vendors

sudo cp api/opencl/config/amdocl64.icd /etc/OpenCL/vendors/

Building

Follow these steps:

  • Build ROCclr first. Follow the steps in the following link to build ROCclr ROCclr Readme In this step, $OPENCL_DIR and $ROCclr_DIR are defined.

  • Building OpenCL Run these commands:

cd "$OPENCL_DIR"
mkdir -p build; cd build
cmake -DUSE_COMGR_LIBRARY=ON -DCMAKE_PREFIX_PATH="$ROCclr_DIR/build" ..
make -j$(nproc)

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

Obsolete

These building instructions should be used for ROCm 3.5 release branch and earlier.

cd $OPENCL_DIR
mkdir -p build; cd build
cmake -DVDI_DIR="$ROCclr_DIR" -DLIBVDI_STATIC_DIR="$ROCclr_DIR/build" ..
make -j$(nproc)

Previously, the environment variable VDI_DIR was defined in ROCclr. We did not use environment variable ROCclr_DIR. The cmake command was:

cmake -DVDI_DIR="$VDI_DIR" -DLIBVDI_STATIC_DIR="$VDI_DIR/build" ..

OpenCL™ is registered Trademark of Apple