public class IntelFpgaOpenclPlugin extends Object implements AbstractFpgaVendorPlugin
Modifier and Type | Class and Description |
---|---|
static class |
IntelFpgaOpenclPlugin.InnerShellExecutor |
Modifier and Type | Field and Description |
---|---|
protected static String |
ALTERAOCLSDKROOT_NAME |
protected static String |
DEFAULT_BINARY_NAME |
static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
IntelFpgaOpenclPlugin() |
Modifier and Type | Method and Description |
---|---|
boolean |
configureIP(String ipPath,
String majorMinorNumber)
Program one device.
|
boolean |
diagnose(int timeout)
Diagnose the devices using vendor toolchain but no need to parse device information
|
List<FpgaResourceAllocator.FpgaDevice> |
discover(int timeout)
Discover the vendor's FPGA devices with execution time constraint
|
String |
downloadIP(String id,
String dstDir,
Map<org.apache.hadoop.fs.Path,List<String>> localizedResources)
The vendor plugin download required IP files to a required directory.
|
Map<String,String> |
getAliasMap() |
org.apache.hadoop.conf.Configuration |
getConf() |
String |
getDefaultBinaryName() |
static String |
getDefaultPathEnvName() |
String |
getDefaultPathToExecutable() |
String |
getDiagnoseInfo(int timeout) |
String |
getFpgaType()
this is actually the opencl platform type
|
String |
getPathToExecutable() |
boolean |
initPlugin(org.apache.hadoop.conf.Configuration conf)
Check the Intel FPGA for OpenCL toolchain
|
void |
parseDiagnoseInfo(String output,
List<FpgaResourceAllocator.FpgaDevice> list)
One real sample output of Intel FPGA SDK 17.0's "aocl diagnose" is as below:
"
aocl diagnose: Running diagnose from /home/fpga/intelFPGA_pro/17.0/hld/board/nalla_pcie/linux64/libexec
------------------------- acl0 -------------------------
Vendor: Nallatech ltd
Phys Dev Name Status Information
aclnalla_pcie0Passed nalla_pcie (aclnalla_pcie0)
PCIe dev_id = 2494, bus:slot.func = 02:00.00, Gen3 x8
FPGA temperature = 54.4 degrees C.
|
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
void |
setPathToExecutable(String pathToExecutable) |
void |
setShell(IntelFpgaOpenclPlugin.InnerShellExecutor shell) |
public static final org.slf4j.Logger LOG
protected static final String DEFAULT_BINARY_NAME
protected static final String ALTERAOCLSDKROOT_NAME
public String getDefaultBinaryName()
public String getDefaultPathToExecutable()
public static String getDefaultPathEnvName()
public String getPathToExecutable()
public void setPathToExecutable(String pathToExecutable)
public void setShell(IntelFpgaOpenclPlugin.InnerShellExecutor shell)
public boolean initPlugin(org.apache.hadoop.conf.Configuration conf)
initPlugin
in interface AbstractFpgaVendorPlugin
public List<FpgaResourceAllocator.FpgaDevice> discover(int timeout)
AbstractFpgaVendorPlugin
discover
in interface AbstractFpgaVendorPlugin
timeout
- The vendor plugin should return result during this timepublic void parseDiagnoseInfo(String output, List<FpgaResourceAllocator.FpgaDevice> list)
public String getDiagnoseInfo(int timeout)
public boolean diagnose(int timeout)
AbstractFpgaVendorPlugin
diagnose
in interface AbstractFpgaVendorPlugin
public String getFpgaType()
getFpgaType
in interface AbstractFpgaVendorPlugin
public String downloadIP(String id, String dstDir, Map<org.apache.hadoop.fs.Path,List<String>> localizedResources)
AbstractFpgaVendorPlugin
downloadIP
in interface AbstractFpgaVendorPlugin
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 namespublic boolean configureIP(String ipPath, String majorMinorNumber)
configureIP
in interface AbstractFpgaVendorPlugin
ipPath
- the absolute path to the aocx IP filemajorMinorNumber
- major:minor stringpublic void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
setConf
in interface AbstractFpgaVendorPlugin
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
getConf
in interface AbstractFpgaVendorPlugin
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.