All Known Implementing Classes:
IntelFpgaOpenclPlugin

@Private @Unstable public interface AbstractFpgaVendorPlugin
FPGA plugin interface for vendor to implement. Used by FpgaDiscoverer and FpgaResourceHandlerImpl to discover devices/download IP/configure IP
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    configureIP(String ipPath, FpgaDevice device)
    The vendor plugin configure an IP file to a device
    boolean
    diagnose(int timeout)
    Diagnose the devices using vendor toolchain but no need to parse device information
    discover(int timeout)
    Discover the vendor's FPGA devices with execution time constraint
    Since all vendor plugins share a FpgaResourceAllocator which distinguish FPGA devices by type.
    boolean
    initPlugin(org.apache.hadoop.conf.Configuration conf)
    Check vendor's toolchain and required environment
    retrieveIPfilePath(String id, String dstDir, Map<org.apache.hadoop.fs.Path,List<String>> localizedResources)
    The vendor plugin download required IP files to a required directory.
  • Method Details

    • initPlugin

      boolean initPlugin(org.apache.hadoop.conf.Configuration conf)
      Check vendor's toolchain and required environment
      Parameters:
      conf - Hadoop configuration
      Returns:
      true if the initialization was successful
    • diagnose

      boolean diagnose(int timeout)
      Diagnose the devices using vendor toolchain but no need to parse device information
      Parameters:
      timeout - timeout in milliseconds
      Returns:
      true if the diagnostics was successful
    • discover

      List<FpgaDevice> discover(int timeout)
      Discover the vendor's FPGA devices with execution time constraint
      Parameters:
      timeout - The vendor plugin should return result during this time
      Returns:
      The result will be added to FPGAResourceAllocator for later scheduling
    • getFpgaType

      String getFpgaType()
      Since all vendor plugins share a FpgaResourceAllocator which distinguish FPGA devices by type. Vendor plugin must report this.
      Returns:
      the type of FPGA plugin represented as a string
    • retrieveIPfilePath

      String retrieveIPfilePath(String id, String dstDir, Map<org.apache.hadoop.fs.Path,List<String>> localizedResources)
      The vendor plugin download required IP files to a required directory. It should check if the IP file has already been downloaded.
      Parameters:
      id - The identifier for IP file. Comes from application, ie. matrix_multi_v1
      dstDir - The plugin should download IP file to this directory
      localizedResources - The container localized resource can be searched for IP file. Key is localized file path and value is soft link names
      Returns:
      The absolute path string of IP file
    • configureIP

      boolean configureIP(String ipPath, FpgaDevice device)
      The vendor plugin configure an IP file to a device
      Parameters:
      ipPath - The absolute path of the IP file
      device - The FPGA device object
      Returns:
      configure device ok or not