Interface DevicePluginScheduler

All Known Implementing Classes:
NECVEPlugin, NvidiaGPUPluginForRuntimeV2

public interface DevicePluginScheduler
An optional interface to implement if custom device scheduling is needed. If this is not implemented, the device framework will do scheduling.
  • Method Details

    • allocateDevices

      Set<Device> allocateDevices(Set<Device> availableDevices, int count, Map<String,String> env)
      Called when allocating devices. The framework will do all device book keeping and fail recovery. So this hook could be stateless and only do scheduling based on available devices passed in. It could be invoked multiple times by the framework. The hint in environment variables passed in could be potentially used in making better scheduling decision. For instance, GPU scheduling might support different kind of policy. The container can set it through environment variables.
      Parameters:
      availableDevices - Devices allowed to be chosen from.
      count - Number of device to be allocated.
      env - Environment variables of the container.
      Returns:
      A set of Device allocated