Visible to Intel only — GUID: jto1521495726248
Ixiasoft
Visible to Intel only — GUID: jto1521495726248
Ixiasoft
4. OpenCL* Support for Multi-Card Systems
Before running an OpenCL* application, program the Intel® PAC with an Accelerator Function (AF) that includes the BSP logic. Use the aocl program command to load an aocx file to the Intel® PAC. It is only necessary to program the AF one time per Intel® PAC. After the initial programming, you can use the OpenCL* API to load different applications to the Intel® PAC using the aocx program command.
$ sudo sh -c "echo 80 > /sys/kernel/mm/hugepages/hugepages-2048kB \
/nr_hugepages"
Run the aocl diagnose command to determine how many FPGAs the system includes. For example, running the aocl diagnose command on a system with two Intel® PAC might show output similar to the following:
- $ aocl diagnose
-------------------------------------------------------------------- ICD System Diagnostics -------------------------------------------------------------------- Using the following location for ICD installation: /etc/OpenCL/vendors Found 2 icd entry at that location: /etc/OpenCL/vendors/Altera.icd /etc/OpenCL/vendors/Intel_FPGA_SSG_Emulator.icd the following OpenCL libraries are referenced in the icd files: libalteracl.so libintelocl.so checking LD_LIBRARY_PATH for registered libraries: libalteracl.so was registered on the system at /tools/quartus/hld/host/linux64/lib libintelocl.so was registered on the system at /tools/quartus/hld/linux64/lib Using the following location for fcd installations: /opt/Intel/OpenCL/Boards Found 1 fcd entry at that location: /opt/Intel/OpenCL/Boards/dcp_bsp.fcd the following OpenCL libraries are referenced in the fcd files: /tools/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/linux64/lib/libintel_opae_mmd.so checking LD_LIBRARY_PATH for registered libraries: /tools/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/linux64/lib/libintel_opae_mmd.so was registered on the system. Number of Platforms = 2 1. Intel(R) FPGA SDK for OpenCL(TM) | Intel(R) Corporation | OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 19.4 2. Intel(R) FPGA Emulation Platform for OpenCL(TM) (preview) | Intel(R) Corporation | OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 19.4 -------------------------------------------------------------------- ICD diagnostics PASSED -------------------------------------------------------------------- -------------------------------------------------------------------- BSP Diagnostics -------------------------------------------------------------------- -------------------------------------------------------------------- Device Name: acl0 BSP Install Location: /home/DCPsupport/intelrtestack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp Vendor: Intel Corp Physical Dev Name Status Information pac_ec00000 Uninitialized OpenCL BSP not loaded. Must load BSP using command: 'aocl program <device_name> <aocx_file>' before running OpenCL programs using this device DIAGNOSTIC_PASSED -------------------------------------------------------------------- -------------------------------------------------------------------- Device Name: acl1 BSP Install Location: /tools/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp Vendor: Intel Corp Physical Dev Name Status Information pac_ec00000 Uninitialized OpenCL BSP not loaded. Must load BSP using command: 'aocl program <device_name> <aocx_file>' before running OpenCL programs using this device DIAGNOSTIC_PASSED --------------------------------------------------------------------
- The following command programs the first card listed in Step 1:
$ aocl program acl0 $OPAE_PLATFORM_ROOT/opencl/hello_world.aocx
aocl program: Running program from $OPAE_PLATFORM_ROOT/opencl \ /opencl_bsp Program succeed.
- The following command programs the second card listed in Step 1:
$ aocl program acl1 $OPAE_PLATFORM_ROOT/opencl/hello_world.aocx
aocl program: Running program from $OPAE_PLATFORM_ROOT/opencl \ /opencl_bsp Program succeed.
- After programming the FPGAs, the aocl diagnose command provides information about them:
$ aocl diagnose
-------------------------------------------------------------------- ICD System Diagnostics -------------------------------------------------------------------- Using the following location for ICD installation: /etc/OpenCL/vendors Found 2 icd entry at that location: /etc/OpenCL/vendors/Altera.icd /etc/OpenCL/vendors/Intel_FPGA_SSG_Emulator.icd the following OpenCL libraries are referenced in the icd files: libalteracl.so libintelocl.so checking LD_LIBRARY_PATH for registered libraries: libalteracl.so was registered on the system at /tools/quartus/hld/host/linux64/lib libintelocl.so was registered on the system at /tools/quartus/hld/linux64/lib Using the following location for fcd installations: /opt/Intel/OpenCL/Boards Found 1 fcd entry at that location: /opt/Intel/OpenCL/Boards/dcp_bsp.fcd the following OpenCL libraries are referenced in the fcd files: /tools/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/linux64/lib/libintel_opae_mmd.so checking LD_LIBRARY_PATH for registered libraries: /tools/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/linux64/lib/libintel_opae_mmd.so was registered on the system. Number of Platforms = 1 1. Intel(R) FPGA SDK for OpenCL(TM) | Intel(R) Corporation | OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 19.4 -------------------------------------------------------------------- ICD diagnostics PASSED -------------------------------------------------------------------- -------------------------------------------------------------------- BSP Diagnostics -------------------------------------------------------------------- -------------------------------------------------------------------- Device Name: acl0 BSP Install Location: /home/DCPsupport/intelrtestack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp Vendor: Intel Corp Physical Dev Name Status Information pac_ec00000 Passed Intel PAC Platform (pac_ec00000) PCIe 134:00.0 FPGA temperature = 42 degrees C. DIAGNOSTIC_PASSED -------------------------------------------------------------------- -------------------------------------------------------------------- Device Name: acl1 BSP Install Location: /tools/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp Vendor: Intel Corp Physical Dev Name Status Information pac_ec00000 Passed Intel PAC Platform (pac_ec00000) PCIe 134:00.0 FPGA temperature = 42 degrees C. DIAGNOSTIC_PASSED --------------------------------------------------------------------
Note: You can run the advanced diagnostic on any specific device in your multi-card system using the following command:$ aocl diagnose <device name>