CHIP-SPV is a HIP implementation that abstracts HIP API, providing a set of base classes that can be derived from to implement an additional, SPIR-V capable backend on which to execute HIP calls. Currently CHIP-SPV OpenCL and Level Zero as backends. This project is a result of HIPCL and HIPLZ projects.
- Cmake >= 3.18.0
- Clang with SPIR-V patches: hipcl-clang
- For Level Zero Backend
- For OpenCL Backend
- An OpenCL implementation with (at least partial) 2.x support; HIPCL requires Shared Virtual Memory and clCreateProgramWithIL() support
git clone https://github.com/CHIP-SPV/chip-spv.git
cd chip-spv
git submodule update --init --recursive
# export PATH=${PATH_TO_CLANG_SPIRV}:$PATH
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=clang++
Run tests on the default backend:
make test
Run tests on a specific backend:
CHIP_BE=<backend> make test
Where the backend
is a backend identification. Possible values for it are
level0
and opencl
.