HALO supports Intel® GPU by Intel® oneDNN. Please check the supported GPU list in oneDNN website.
Here is the list copied from oneDNN:
- Intel Processor Graphics based on Gen9, Gen9.5 and Gen11, and Gen12 architectures
- Intel Iris(R) Xe graphics (formerly DG1)
- Future Intel Arc(TM) graphics (code name Alchemist and DG2)
Please refer the Intel® software for general purpose GPU capabilities to install the driver and softwares.
In Ubuntu, please install tool:
sudo apt update
sudo apt install clinfo
Run the cmd to check the Intel GPU is ready:
clinfo -l
or
sudo clinfo -l
For Gen9, the result is:
Platform #0: Intel(R) OpenCL HD Graphics
`-- Device #0: Intel(R) Graphics [0x5927]
source /opt/intel/oneapi/compiler/latest/env/vars.sh
source /opt/intel/oneapi/dnnl/latest/env/vars.sh
source /opt/intel/oneapi/dpl/latest/env/vars.sh
source /opt/intel/oneapi/tbb/latest/env/vars.sh
Add -DODLA_BUILD_DNNL_GPU=ON
in cmake cmd:
cd heterogeneity-aware-lowering-and-optimization
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DODLA_BUILD_POPART=OFF -DODLA_BUILD_TRT=OFF -DODLA_BUILD_DNNL_GPU=ON -G Ninja ..
ninja
There will be file ./lib/libodla_dnnl_gpu.so
to be created.
Set path for binary and library:
export HALO_ROOT=/xxx/halo
export PATH=$HALO_ROOT/heterogeneity-aware-lowering-and-optimization/build/bin/:$PATH
export LD_LIBRARY_PATH=$DNNLROOT/lib:$HALO_ROOT/heterogeneity-aware-lowering-and-optimization/build/lib:$LD_LIBRARY_PATH
Add -lodla_dnnl_gpu
in link cmd.
Please refer to Test HALO on Intel® GPU