FPGA Configuration
FPGA configuration for usage in DAPHNE
System requirments
Daphne build script for FPGA kernels support requires additional QUARTUSDIR system variable definition. Example command is presented in fpga-build-env.sh or in the following command:
export QUARTUSDIR=/opt/intel/intelFPGA_pro/21.4
To build the Daphne with the FPGA support -fpgaopencl
flag has to be used:
./build.sh --fpgaopenc
To run developed or precompiled, included in Daphne repository FPGA OpenCL kernels an installedand configured FPGA device is required. Our example kernels have been tested using Intel(R) PAC D5005 card
DAPHNE contains some example linear algebra kernels developed using T2SP framework. Example precompiled FPGA kernels can be usedon DAPHNE DSL description level. To prepare the system for the precompiled FPGA kernels some FPGA and OpenCL system variables are required. The easiest way to set up required varables is to use the init_opencl.sh script from installed Intel(R) Quartus sowtware or from the Intel(R) OpenCL RTE or Intel(R) OpenCL SDK packages.
Example script usage:
source /opt/intel/intelFPGA_pro/21.4/hld/init_opencl.sh
For additional details please look into the Intel guide or SDK for openCL.
Precompiled FPGA Kernels
To use a precompiled FPGA kernel a FPGA image is required (*.aocx). FPGA device has to programmed with particular image which contains required kernel implementation. Example FPGA programming command using example FPGA image:
aocl program acl0 src/runtime/local/kernels/FPGAOPENCL/bitstreams/sgemm.aocx
Additionally the BITSTREAM variable has to be defind in the system. Please look into the following example:
export BITSTREAM=src/runtime/local/kernels/FPGAOPENCL/bitstreams/sgemm.aocx
When another FPGA image contains implementation for another required computational kernel then FPGA device has to be reprogrammed and BITSTREAM variable value has to be changed.