Class GpuDiscoverer
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.yarn.server.nodemanager.containermanager.resourceplugin.gpu.GpuDiscoverer
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
@Private
@Unstable
public class GpuDiscoverer
extends org.apache.hadoop.conf.Configured
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet GPU device information from system.Get list of GPU devices usable by YARN.voidinitialize(org.apache.hadoop.conf.Configuration config, NvidiaBinaryHelper nvidiaHelper) Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG
-
-
Constructor Details
-
GpuDiscoverer
public GpuDiscoverer()
-
-
Method Details
-
getGpuDeviceInformation
public GpuDeviceInformation getGpuDeviceInformation() throws org.apache.hadoop.yarn.exceptions.YarnExceptionGet GPU device information from system. This need to be called after initialize. Please note that this only works on *NIX platform, so external caller need to make sure this.- Returns:
- GpuDeviceInformation
- Throws:
org.apache.hadoop.yarn.exceptions.YarnException- when any error happens
-
getGpusUsableByYarn
Get list of GPU devices usable by YARN.- Returns:
- List of GPU devices
- Throws:
org.apache.hadoop.yarn.exceptions.YarnException
-
initialize
public void initialize(org.apache.hadoop.conf.Configuration config, NvidiaBinaryHelper nvidiaHelper) throws org.apache.hadoop.yarn.exceptions.YarnException - Throws:
org.apache.hadoop.yarn.exceptions.YarnException
-