Multi Instance GPU Management(3)

NAME
Multi Instance GPU Management -

  Defines

#define NVML_DEVICE_MIG_DISABLE 0x0
#define NVML_DEVICE_MIG_ENABLE 0x1
#define NVML_GPU_INSTANCE_PROFILE_1_SLICE 0x0
#define NVML_COMPUTE_INSTANCE_PROFILE_1_SLICE 0x0
#define NVML_COMPUTE_INSTANCE_ENGINE_PROFILE_SHARED 0x0
All the engines except multiprocessors would be shared.

  Functions

nvmlReturn_t DECLDIR nvmlDeviceSetMigMode (nvmlDevice_t device, unsigned int mode, nvmlReturn_t *activationStatus)
nvmlReturn_t DECLDIR nvmlDeviceGetMigMode (nvmlDevice_t device, unsigned int *currentMode, unsigned int *pendingMode)
nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceProfileInfo (nvmlDevice_t device, unsigned int profile, nvmlGpuInstanceProfileInfo_t *info)
nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstancePossiblePlacements (nvmlDevice_t device, unsigned int profileId, nvmlGpuInstancePlacement_t *placements, unsigned int *count)
nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceRemainingCapacity (nvmlDevice_t device, unsigned int profileId, unsigned int *count)
nvmlReturn_t DECLDIR nvmlDeviceCreateGpuInstance (nvmlDevice_t device, unsigned int profileId, nvmlGpuInstance_t *gpuInstance)
nvmlReturn_t DECLDIR nvmlGpuInstanceDestroy (nvmlGpuInstance_t gpuInstance)
nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstances (nvmlDevice_t device, unsigned int profileId, nvmlGpuInstance_t *gpuInstances, unsigned int *count)
nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceById (nvmlDevice_t device, unsigned int id, nvmlGpuInstance_t *gpuInstance)
nvmlReturn_t DECLDIR nvmlGpuInstanceGetInfo (nvmlGpuInstance_t gpuInstance, nvmlGpuInstanceInfo_t *info)
nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstanceProfileInfo (nvmlGpuInstance_t gpuInstance, unsigned int profile, unsigned int engProfile, nvmlComputeInstanceProfileInfo_t *info)
nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstanceRemainingCapacity (nvmlGpuInstance_t gpuInstance, unsigned int profileId, unsigned int *count)
nvmlReturn_t DECLDIR nvmlGpuInstanceCreateComputeInstance (nvmlGpuInstance_t gpuInstance, unsigned int profileId, nvmlComputeInstance_t *computeInstance)
nvmlReturn_t DECLDIR nvmlComputeInstanceDestroy (nvmlComputeInstance_t computeInstance)
nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstances (nvmlGpuInstance_t gpuInstance, unsigned int profileId, nvmlComputeInstance_t *computeInstances, unsigned int *count)
nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstanceById (nvmlGpuInstance_t gpuInstance, unsigned int id, nvmlComputeInstance_t *computeInstance)
nvmlReturn_t DECLDIR nvmlComputeInstanceGetInfo (nvmlComputeInstance_t computeInstance, nvmlComputeInstanceInfo_t *info)
nvmlReturn_t DECLDIR nvmlDeviceIsMigDeviceHandle (nvmlDevice_t device, unsigned int *isMigDevice)
nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceId (nvmlDevice_t device, unsigned int *id)
nvmlReturn_t DECLDIR nvmlDeviceGetComputeInstanceId (nvmlDevice_t device, unsigned int *id)
nvmlReturn_t DECLDIR nvmlDeviceGetMaxMigDeviceCount (nvmlDevice_t device, unsigned int *count)
nvmlReturn_t DECLDIR nvmlDeviceGetMigDeviceHandleByIndex (nvmlDevice_t device, unsigned int index, nvmlDevice_t *migDevice)
nvmlReturn_t DECLDIR nvmlDeviceGetDeviceHandleFromMigDeviceHandle (nvmlDevice_t migDevice, nvmlDevice_t *device)

Detailed Description

This chapter describes NVML operations that are associated with Multi Instance GPU management.

Define Documentation

  #define NVML_COMPUTE_INSTANCE_PROFILE_1_SLICE 0x0

Compute instance profiles.

These macros should be passed to nvmlGpuInstanceGetComputeInstanceProfileInfo to retrieve the detailed information about a compute instance such as profile ID, engine counts

  #define NVML_DEVICE_MIG_DISABLE 0x0

Disable Multi Instance GPU mode.

  #define NVML_DEVICE_MIG_ENABLE 0x1

Enable Multi Instance GPU mode.

  #define NVML_GPU_INSTANCE_PROFILE_1_SLICE 0x0

GPU instance profiles.

These macros should be passed to nvmlDeviceGetGpuInstanceProfileInfo to retrieve the detailed information about a GPU instance such as profile ID, engine counts.

Function Documentation

  nvmlReturn_t DECLDIR nvmlComputeInstanceDestroy (nvmlComputeInstance_t computeInstance)

Destroy compute instance.

For newer than Volta (TM) fully supported devices. Supported on Linux only. Requires privileged user.

Parameters:
    computeInstance The compute instance handle

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If computeInstance is invalid

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

    •   NVML_ERROR_IN_USE If the compute instance is in use. This error would be returned if processes (e.g. CUDA application) are active on the compute instance.

  nvmlReturn_t DECLDIR nvmlComputeInstanceGetInfo (nvmlComputeInstance_t computeInstance, nvmlComputeInstanceInfo_t * info)

Get compute instance information.

For newer than Volta (TM) fully supported devices. Supported on Linux only.

Parameters:
    computeInstance The compute instance handle
    info Return compute instance information

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If computeInstance or info are invalid

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

  nvmlReturn_t DECLDIR nvmlDeviceCreateGpuInstance (nvmlDevice_t device, unsigned int profileId, nvmlGpuInstance_t * gpuInstance)

Create GPU instance.

For newer than Volta (TM) fully supported devices. Supported on Linux only. Requires privileged user.

If the parent device is unbound, reset or the GPU instance is destroyed explicitly, the GPU instance handle would become invalid. The GPU instance must be recreated to acquire a valid handle.

Parameters:
    device The identifier of the target device
    profileId The GPU instance profile ID. See nvmlDeviceGetGpuInstanceProfileInfo
    gpuInstance Returns the GPU instance handle

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If device, profile, profileId or gpuInstance are invalid

    •   NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

    •   NVML_ERROR_INSUFFICIENT_RESOURCES If the requested GPU instance could not be created

  nvmlReturn_t DECLDIR nvmlDeviceGetComputeInstanceId (nvmlDevice_t device, unsigned int * id)

Get compute instance ID for the given MIG device handle.

Compute instance IDs are unique per GPU instance and remain valid until the compute instance is destroyed.

For newer than Volta (TM) fully supported devices. Supported on Linux only.

Parameters:
    device Target MIG device handle
    id Compute instance ID

Returns:

    •   NVML_SUCCESS if instance ID was successfully retrieved

    •   NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT if device or id reference is invalid

    •   NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device

    •   NVML_ERROR_UNKNOWN on any unexpected error

  nvmlReturn_t DECLDIR nvmlDeviceGetDeviceHandleFromMigDeviceHandle (nvmlDevice_t migDevice, nvmlDevice_t * device)

Get parent device handle from a MIG device handle.

For newer than Volta (TM) fully supported devices. Supported on Linux only.

Parameters:
    migDevice MIG device handle
    device Device handle

Returns:

    •   NVML_SUCCESS if device handle was successfully created

    •   NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT if migDevice or device is invalid

    •   NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device

    •   NVML_ERROR_UNKNOWN on any unexpected error

  nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceById (nvmlDevice_t device, unsigned int id, nvmlGpuInstance_t * gpuInstance)

Get GPU instances for given instance ID.

For newer than Volta (TM) fully supported devices. Supported on Linux only. Requires privileged user.

Parameters:
    device The identifier of the target device
    id The GPU instance ID
    gpuInstance Returns GPU instance

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If device, id or gpuInstance are invalid

    •   NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

    •   NVML_ERROR_NOT_FOUND If the GPU instance is not found.

  nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceId (nvmlDevice_t device, unsigned int * id)

Get GPU instance ID for the given MIG device handle.

GPU instance IDs are unique per device and remain valid until the GPU instance is destroyed.

For newer than Volta (TM) fully supported devices. Supported on Linux only.

Parameters:
    device Target MIG device handle
    id GPU instance ID

Returns:

    •   NVML_SUCCESS if instance ID was successfully retrieved

    •   NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT if device or id reference is invalid

    •   NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device

    •   NVML_ERROR_UNKNOWN on any unexpected error

  nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstancePossiblePlacements (nvmlDevice_t device, unsigned int profileId, nvmlGpuInstancePlacement_t * placements, unsigned int * count)

Get GPU instance placements.

A placement represents the location of a GPU instance within a device. This API only returns all the possible placements for the given profile.

For newer than Volta (TM) fully supported devices. Supported on Linux only. Requires privileged user.

Parameters:
    device The identifier of the target device
    profileId The GPU instance profile ID. See nvmlDeviceGetGpuInstanceProfileInfo
    placements Returns placements, the buffer must be large enough to accommodate the instances supported by the profile. See nvmlDeviceGetGpuInstanceProfileInfo
    count The count of returned placements

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If device, profileId, placements or count are invalid

    •   NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled or profileId isn't supported

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

  nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceProfileInfo (nvmlDevice_t device, unsigned int profile, nvmlGpuInstanceProfileInfo_t * info)

Get GPU instance profile information.

Information provided by this API is immutable throughout the lifetime of a MIG mode.

For newer than Volta (TM) fully supported devices. Supported on Linux only. Requires privileged user.

Parameters:
    device The identifier of the target device
    profile One of the NVML_GPU_INSTANCE_PROFILE_*
    info Returns detailed profile information

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If device, profile or info are invalid

    •   NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled or profile isn't supported

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

  nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstanceRemainingCapacity (nvmlDevice_t device, unsigned int profileId, unsigned int * count)

Get GPU instance profile capacity.

For newer than Volta (TM) fully supported devices. Supported on Linux only. Requires privileged user.

Parameters:
    device The identifier of the target device
    profileId The GPU instance profile ID. See nvmlDeviceGetGpuInstanceProfileInfo
    count Returns remaining instance count for the profile ID

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If device, profileId or count are invalid

    •   NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled or profileId isn't supported

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

  nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstances (nvmlDevice_t device, unsigned int profileId, nvmlGpuInstance_t * gpuInstances, unsigned int * count)

Get GPU instances for given profile ID.

For newer than Volta (TM) fully supported devices. Supported on Linux only. Requires privileged user.

Parameters:
    device The identifier of the target device
    profileId The GPU instance profile ID. See nvmlDeviceGetGpuInstanceProfileInfo
    gpuInstances Returns pre-exiting GPU instances, the buffer must be large enough to accommodate the instances supported by the profile. See nvmlDeviceGetGpuInstanceProfileInfo
    count The count of returned GPU instances

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If device, profileId, gpuInstances or count are invalid

    •   NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

  nvmlReturn_t DECLDIR nvmlDeviceGetMaxMigDeviceCount (nvmlDevice_t device, unsigned int * count)

Get the maximum number of MIG devices that can exist under a given parent NVML device.

Returns zero if MIG is not supported or enabled.

For newer than Volta (TM) fully supported devices. Supported on Linux only.

Parameters:
    device Target device handle
    count Count of MIG devices

Returns:

    •   NVML_SUCCESS if count was successfully retrieved

    •   NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT if device or count reference is invalid

    •   NVML_ERROR_UNKNOWN on any unexpected error

  nvmlReturn_t DECLDIR nvmlDeviceGetMigDeviceHandleByIndex (nvmlDevice_t device, unsigned int index, nvmlDevice_t * migDevice)

Get MIG device handle for the given index under its parent NVML device.

If the compute instance is destroyed either explicitly or by destroying, resetting or unbinding the parent GPU instance or the GPU device itself the MIG device handle would remain invalid and must be requested again using this API. Handles may be reused and their properties can change in the process.

For newer than Volta (TM) fully supported devices. Supported on Linux only.

Parameters:
    device Reference to the parent GPU device handle
    index Index of the MIG device
    migDevice Reference to the MIG device handle

Returns:

    •   NVML_SUCCESS if migDevice handle was successfully created

    •   NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT if device, index or migDevice reference is invalid

    •   NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device

    •   NVML_ERROR_NOT_FOUND if no valid MIG device was found at index

    •   NVML_ERROR_UNKNOWN on any unexpected error

  nvmlReturn_t DECLDIR nvmlDeviceGetMigMode (nvmlDevice_t device, unsigned int * currentMode, unsigned int * pendingMode)

Get MIG mode for the device.

For newer than Volta (TM) fully supported devices. Supported on Linux only.

Changing MIG modes may require device unbind or reset. The 'pending' MIG mode refers to the target mode following the next activation trigger.

Parameters:
    device The identifier of the target device
    currentMode Returns the current mode, NVML_DEVICE_MIG_DISABLE or NVML_DEVICE_MIG_ENABLE
    pendingMode Returns the pending mode, NVML_DEVICE_MIG_DISABLE or NVML_DEVICE_MIG_ENABLE

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If device, currentMode or pendingMode are invalid

    •   NVML_ERROR_NOT_SUPPORTED If device doesn't support MIG mode

  nvmlReturn_t DECLDIR nvmlDeviceIsMigDeviceHandle (nvmlDevice_t device, unsigned int * isMigDevice)

Test if the given handle refers to a MIG device.

A MIG device handle is an NVML abstraction which maps to a MIG compute instance. These overloaded references can be used (with some restrictions) interchangeably with a GPU device handle to execute queries at a per-compute instance granularity.

For newer than Volta (TM) fully supported devices. Supported on Linux only.

Parameters:
    device NVML handle to test
    isMigDevice True when handle refers to a MIG device

Returns:

    •   NVML_SUCCESS if device status was successfully retrieved

    •   NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT if device handle or isMigDevice reference is invalid

    •   NVML_ERROR_NOT_SUPPORTED if this check is not supported by the device

    •   NVML_ERROR_UNKNOWN on any unexpected error

  nvmlReturn_t DECLDIR nvmlDeviceSetMigMode (nvmlDevice_t device, unsigned int mode, nvmlReturn_t * activationStatus)

Set MIG mode for the device.

For newer than Volta (TM) fully supported devices. Supported on Linux only. Requires root user.

This mode determines whether a GPU instance can be created.

This API may unbind or reset the device to activate the requested mode. Thus, the attributes associated with the device, such as minor number, might change. The caller of this API is expected to query such attributes again.

On certain platforms like pass-through virtualization, where reset functionality may not be exposed directly, VM reboot is required. activationStatus would return NVML_ERROR_RESET_REQUIRED for such cases.

activationStatus would return the appropriate error code upon unsuccessful activation. For example, if device unbind fails because the device isn't idle, NVML_ERROR_IN_USE would be returned. The caller of this API is expected to idle the device and retry setting the mode.

Parameters:
    device The identifier of the target device
    mode The mode to be set, NVML_DEVICE_MIG_DISABLE or NVML_DEVICE_MIG_ENABLE
    activationStatus The activationStatus status

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If device,mode or activationStatus are invalid

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

    •   NVML_ERROR_NOT_SUPPORTED If device doesn't support MIG mode

  nvmlReturn_t DECLDIR nvmlGpuInstanceCreateComputeInstance (nvmlGpuInstance_t gpuInstance, unsigned int profileId, nvmlComputeInstance_t * computeInstance)

Create compute instance.

For newer than Volta (TM) fully supported devices. Supported on Linux only. Requires privileged user.

If the parent device is unbound, reset or the parent GPU instance is destroyed or the compute instance is destroyed explicitly, the compute instance handle would become invalid. The compute instance must be recreated to acquire a valid handle.

Parameters:
    gpuInstance The identifier of the target GPU instance
    profileId The compute instance profile ID. See nvmlGpuInstanceGetComputeInstanceProfileInfo
    computeInstance Returns the compute instance handle

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If gpuInstance, profile, profileId or computeInstance are invalid

    •   NVML_ERROR_NOT_SUPPORTED If profileId isn't supported

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

    •   NVML_ERROR_INSUFFICIENT_RESOURCES If the requested compute instance could not be created

  nvmlReturn_t DECLDIR nvmlGpuInstanceDestroy (nvmlGpuInstance_t gpuInstance)

Destroy GPU instance.

For newer than Volta (TM) fully supported devices. Supported on Linux only. Requires privileged user.

Parameters:
    gpuInstance The GPU instance handle

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If gpuInstance is invalid

    •   NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

    •   NVML_ERROR_IN_USE If the GPU instance is in use. This error would be returned if processes (e.g. CUDA application) or compute instances are active on the GPU instance.

  nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstanceById (nvmlGpuInstance_t gpuInstance, unsigned int id, nvmlComputeInstance_t * computeInstance)

Get compute instance for given instance ID.

For newer than Volta (TM) fully supported devices. Supported on Linux only. Requires privileged user.

Parameters:
    gpuInstance The identifier of the target GPU instance
    id The compute instance ID
    computeInstance Returns compute instance

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If device, ID or computeInstance are invalid

    •   NVML_ERROR_NOT_SUPPORTED If device doesn't have MIG mode enabled

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

    •   NVML_ERROR_NOT_FOUND If the compute instance is not found.

  nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstanceProfileInfo (nvmlGpuInstance_t gpuInstance, unsigned int profile, unsigned int engProfile, nvmlComputeInstanceProfileInfo_t * info)

Get compute instance profile information.

Information provided by this API is immutable throughout the lifetime of a MIG mode.

For newer than Volta (TM) fully supported devices. Supported on Linux only. Requires privileged user.

Parameters:
    gpuInstance The identifier of the target GPU instance
    profile One of the NVML_COMPUTE_INSTANCE_PROFILE_*
    engProfile One of the NVML_COMPUTE_INSTANCE_ENGINE_PROFILE_*
    info Returns detailed profile information

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If gpuInstance, profile, engProfile or info are invalid

    •   NVML_ERROR_NOT_SUPPORTED If profile isn't supported

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

  nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstanceRemainingCapacity (nvmlGpuInstance_t gpuInstance, unsigned int profileId, unsigned int * count)

Get compute instance profile capacity.

For newer than Volta (TM) fully supported devices. Supported on Linux only. Requires privileged user.

Parameters:
    gpuInstance The identifier of the target GPU instance
    profileId The compute instance profile ID. See nvmlGpuInstanceGetComputeInstanceProfileInfo
    count Returns remaining instance count for the profile ID

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If gpuInstance, profileId or availableCount are invalid

    •   NVML_ERROR_NOT_SUPPORTED If profileId isn't supported

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

  nvmlReturn_t DECLDIR nvmlGpuInstanceGetComputeInstances (nvmlGpuInstance_t gpuInstance, unsigned int profileId, nvmlComputeInstance_t * computeInstances, unsigned int * count)

Get compute instances for given profile ID.

For newer than Volta (TM) fully supported devices. Supported on Linux only. Requires privileged user.

Parameters:
    gpuInstance The identifier of the target GPU instance
    profileId The compute instance profile ID. See nvmlGpuInstanceGetComputeInstanceProfileInfo
    computeInstances Returns pre-exiting compute instances, the buffer must be large enough to accommodate the instances supported by the profile. See nvmlGpuInstanceGetComputeInstanceProfileInfo
    count The count of returned compute instances

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If gpuInstance, profileId, computeInstances or count are invalid

    •   NVML_ERROR_NOT_SUPPORTED If profileId isn't supported

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

  nvmlReturn_t DECLDIR nvmlGpuInstanceGetInfo (nvmlGpuInstance_t gpuInstance, nvmlGpuInstanceInfo_t * info)

Get GPU instance information.

For newer than Volta (TM) fully supported devices. Supported on Linux only.

Parameters:
    gpuInstance The GPU instance handle
    info Return GPU instance information

Returns:

    •   NVML_SUCCESS Upon success

    •   NVML_ERROR_UNINITIALIZED If library has not been successfully initialized

    •   NVML_ERROR_INVALID_ARGUMENT If gpuInstance or info are invalid

    •   NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation

Author

Generated automatically by Doxygen for NVML from the source code.