Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Questions about DLA_AOCX and CL_CONTEXT_COMPILER_MODE_INTELFPGA

dangu
Beginner
411 Views

Can someone help clarify the effect these two variables have on FPGA bitstream loading? The description at https://docs.openvinotoolkit.org/latest/_docs_IE_DG_supported_plugins_FPGA.html is a little vague.

My understanding is that mode 1 means the bitstream pointed to by DLA_AOCX will be programmed automatically by OpenVINO (presumably when Core::LoadNetwork is called with an FPGA device?) With mode = 1, does bitstream (re-)programming happen on every call to LoadNetwork? Or just once when the process first calls it? Can OpenVINO detect the bitstream is already loaded and only load if necessary?

It sounds like mode 3 means the user is responsible for programming the bitstream prior to running the OpenVINO application. If that is true, I assume the value of DLA_AOCX has no effect when mode = 3? What happens if the CL_CONTEXT_COMPILER_MODE_INTELFPGA variable isn't set at all?

Finally, is CL_CONTEXT_COMPILER_MODE_ALTERA still a thing? The docs no longer reference it, so I'm guessing it's deprecated or removed. I assume I shouldn't be setting it if I'm running 2020.2, but I just wanted to verify.

Thanks!

 

0 Kudos
1 Reply
Munesh_Intel
Moderator
411 Views

Hi Dangu,

Programming of the board is not supported during runtime and must be done before running an application.

The relevant information is available at the following page:

https://docs.openvinotoolkit.org/2020.3/_docs_IE_DG_supported_plugins_FPGA.html#set_environment_for_running_the_fpga_plugin

The recommended practice is to try avoiding programming the bit stream during runtime. However, you can also explore and validate bitstream programming on your end as well.

Set CL_CONTEXT_COMPILER_MODE_INTELFPGA=1 if you want to program the bitstream during runtime.

Setting CL_CONTEXT_COMPILER_MODE_INTELFPGA=3 prevents the host application from programming the FPGA.

Unsetting the CL_CONTEXT_COMPILER_MODE_INTELFPGA variable allows the OpenCL host runtime to reprogram the FPGA as needed, which it does at least once during initialization.

And to answer your last question, CL_CONTEXT_COMPILER_MODE_ALTERA is rebranded as CL_CONTEXT_COMPILER_MODE_INTELFPGA.

However, for setting up the OpenCL™ environment for Intel® Programmable Acceleration Card, you’ll still need to set both variables as well.

More information is available at the following link:

https://docs.openvinotoolkit.org/2020.3/_docs_install_guides_PAC_Configure.html#verify_the_intel_acceleration_stack_for_fpgas_opencl_bsp

 

Regards,

Munesh

0 Kudos
Reply