Configure FPGA scheduling and isolation

You can enable and configure FPGA as a resource type using Cloudera Manager.

Ensure that the FPGA Runtime or SDK is installed in such a way that the aocl command is executable by the NodeManager. For more information about how to install FPGA, see Intel Acceleration Stack Quick Start Guide for Intel Programmable Acceleration Card with Intel Arria 10 GX FPGA.

  1. In Cloudera Manager, select the YARN service.
  2. Click the Configuration tab.
  3. Select FPGA Management category under Filters.
  4. Find the Enable FPGA Usage property and select the NodeManagers that can provide FPGA devices to YARN applications that request them.
  5. Use the Path to FPGA (aocl) tool property to specify the full local path to the Intel aocl tool installed on the applicable nodes.
  6. Use the Allowed FPGA devices to specify the FPGA devices which can be managed by YARN NodeManager.
    Valid values are the following:
    • Auto: Default value. All available FPGA devices are allowed.
    • Comma separated list: List the minor number of the allowed FPGAs. For example: 0,1
  7. Use the List of available FPGA devices property to manually specify the available FPGA devices.

    Provide the value in the following format: deviceA/major_number:minor_number,deviceB/major_number:minor_number

    For example: acl0/238:0,acl1/238:1

    The acl numbers are displayed using the aocl diagnose command.

    The major and minor device numbers can usually be determined by listing the device files under /dev. Every card has a corresponding device file. The ls -l command shows both numbers.

  8. Use the FPGA device major number property to provide the major device number of the FPGA card.
    This property is used in the container-executor.cfg file.
  9. Use the FPGA initializer script property to provide the path to the shell script that sets up the environment for the FPGA device.

    The initializer script sets up various environment variables, and sources other scripts allowing the aocl tool to run properly. The contents of this script depends heavily on the installation. For example, in case of Intel Processing Accelerator Card (PAC), it is necessary to source init_env.sh and init_opencl.sh.

    The following environment variables are possibly required to be exported:
    • AOCL_BOARD_PACKAGE_ROOT
    • CL_CONTEXT_COMPILER_MODE_INTELFPGA

    Please consult the vendor’s documentation for further details.

  10. Click Save Changes.
  11. Restart the affected NodeManagers.
FPGA support is enabled and configured.
Request FPGA resource by specifying yarn.io/fpga as a resource.