In a nutshell, OCCA (like oca-rina) is an open-source library which aims to
- Make it easy to program different types of devices (e.g. CPU, GPU, FPGA)
- Provide a unified API for interacting with backend device APIs (e.g. OpenMP, CUDA, HIP, OpenCL, Metal)
- Use just-in-time compilation to build backend kernels
- Provide a kernel language, a minor extension to C, to abstract programming for each backend
- Documentation
- Want to contribute? Checkout the 'beginner' issues
- 🌟 Who is using OCCA?
git clone --depth 1 https://github.com/libocca/occa.git
cd occa
make -j 4
Setup environment variables inside the occa
directory
export PATH+=":${PWD}/bin"
export LD_LIBRARY_PATH+=":${PWD}/lib"
export PATH+=":${PWD}/bin"
export DYLD_LIBRARY_PATH+=":${PWD}/lib"
cd examples/cpp/1_add_vectors
make
./main
There is an executable occa
provided inside bin
> occa --help
Usage: occa COMMAND
Can be used to display information of cache kernels.
Commands:
autocomplete Prints shell functions to autocomplete occa
commands and arguments
cache Cache kernels
clear Clears cached files and cache locks
compile Compile kernels
env Print environment variables used in OCCA
info Prints information about available backend modes
modes Prints available backend modes
translate Translate kernels
version Prints OCCA library version
Arguments:
COMMAND Command to run
. <(occa autocomplete bash)