Interface AbstractFpgaVendorPlugin
- 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 TypeMethodDescriptionbooleanconfigureIP(String ipPath, FpgaDevice device) The vendor plugin configure an IP file to a devicebooleandiagnose(int timeout) Diagnose the devices using vendor toolchain but no need to parse device informationdiscover(int timeout) Discover the vendor's FPGA devices with execution time constraintSince all vendor plugins share aFpgaResourceAllocatorwhich distinguish FPGA devices by type.booleaninitPlugin(org.apache.hadoop.conf.Configuration conf) Check vendor's toolchain and required environmentretrieveIPfilePath(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
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 aFpgaResourceAllocatorwhich 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_v1dstDir- The plugin should download IP file to this directorylocalizedResources- 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
The vendor plugin configure an IP file to a device- Parameters:
ipPath- The absolute path of the IP filedevice- The FPGA device object- Returns:
- configure device ok or not
-