2.3. Initializing the Intel® Acceleration Stack for OpenCL* in a Virtualized Environment
Follow the installation instructions from the Quick Start Guide to set up the Intel® FPGA PAC D5005.
Once the stack setup is complete, follow the steps below to setup OpenCL on Intel® FPGA PAC D5005.
You can run the OPAE software in a non-virtualized environment with the Single Root I/O Virtualization (SR-IOV) disabled or in a virtualized environment with the SR-IOV enabled.
- Program the required OpenCL* configuration from the host machine by typing the following command:
aocl program <device name> <filename>
You can see the device name in the output for aocl diagnose and you can use one of the pre-compiled bitstream for programming. For example,
$ aocl program acl0 signed_vector_add.aocx aocl program: Running program from /home/DCPsupport/intelrtestack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/linux64/libexec Program succeed.
aocl program acl0 $OPAE_PLATFORM_ROOT/opencl/hello_world.aocxNote: The 2.0.1 Release does not support partial reconfiguration in virtualized environment.
- Enable virtualization using the instructions from section Updating Settings Required for VFs and section Configuring the VF Port on the Host of the Quick Start Guide.
- Set the CL_CONTEXT_COMPILER_MODE_INTELFPGA environment variable in the virtual machine to disable FPGA configuration or reconfiguration during OpenCL* host runtime:
$ export CL_CONTEXT_COMPILER_MODE_INTELFPGA=3
- Run the required application from the virtual machine.
- Disable virtualization using the instruction from section Disconnecting the VF from the VM and Reconnecting to the PF of the Quick Start Guide.