cuda.bindings.nvml.device_get_api_restriction#

cuda.bindings.nvml.device_get_api_restriction(intptr_t device, int api_type) int#

Retrieves the root/admin permissions on the target API. See nvmlRestrictedAPI_t for the list of supported APIs. If an API is restricted only root users can call that API. See nvmlDeviceSetAPIRestriction to change current permissions.

Parameters:
  • device (intptr_t) – The identifier of the target device.

  • api_type (RestrictedAPI) – Target API type for this operation.

Returns:

Reference in which to return the current restriction NVML_FEATURE_ENABLED indicates that the API is root-only NVML_FEATURE_DISABLED indicates that the API is accessible to all users.

Return type:

int

See also

nvmlDeviceGetAPIRestriction