OpenCL* on Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA Quick Start User Guide

ID 683831
Date 6/05/2020
Public

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.

Note: For a system with one Intel® PAC, Intel® recommends that you allocate the number of hugepages to 20. If your system has multiple Intel® PACs, you must allocate 20 hugepages per card. For example, a system with four Intel® PAC requires of total 80 hugepages.
To set the hugepages to 80, enter the following 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:

  1. $ 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
    --------------------------------------------------------------------
    
  2. 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.
  3. 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.
  4. 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>

Did you find the information on this page useful?

Characters remaining:

Feedback Message