Enums and Macros - 枚举和宏
- group dcgmReturnEnums
Defines - 定义
-
MAKE_DCGM_VERSION(typeName, ver) (unsigned int)(sizeof(typeName) | ((unsigned long)(ver) << 24U))
Creates a unique version number for each struct. - 为每个结构体创建唯一的版本号。
-
DCGM_BLANK_VALUES
Represents value of the field which can be returned by Host Engine in case the operation is not successful. - 表示操作不成功时,主机引擎可以返回的字段值。
-
DCGM_INT8_BLANK 0x70
Base value for 8 bits integer blank. - 8 位整数空白值的基值。
can be used as an unspecified blank - 可以用作未指定的空白值
-
DCGM_INT32_BLANK 0x7ffffff0
Base value for 32 bits integer blank. - 32 位整数空白值的基值。
can be used as an unspecified blank - 可以用作未指定的空白值
-
DCGM_INT64_BLANK 0x7ffffffffffffff0
Base value for 64 bits integer blank. - 64 位整数空白值的基值。
can be used as an unspecified blank - 可以用作未指定的空白值
-
DCGM_FP64_BLANK 140737488355328.0
Base value for double blank. - 双精度浮点数空白值的基值。
2 ** 47. FP 64 has 52 bits of mantissa, so 47 bits can still increment by 1 and represent each value from 0-15 - 2 ** 47。FP 64 有 52 位尾数,因此 47 位仍然可以递增 1,并表示 0-15 之间的每个值
-
DCGM_STR_BLANK "<<<NULL>>>"
Base value for string blank. - 字符串空白值的基值。
-
DCGM_INT32_NOT_FOUND (DCGM_INT32_BLANK + 1)
Represents an error where INT32 data was not found. - 表示未找到 INT32 数据的错误。
-
DCGM_INT64_NOT_FOUND (DCGM_INT64_BLANK + 1)
Represents an error where INT64 data was not found. - 表示未找到 INT64 数据的错误。
-
DCGM_FP64_NOT_FOUND (DCGM_FP64_BLANK + 1.0)
Represents an error where FP64 data was not found. - 表示未找到 FP64 数据的错误。
-
DCGM_STR_NOT_FOUND "<<<NOT_FOUND>>>"
Represents an error where STR data was not found. - 表示未找到 STR 数据的错误。
-
DCGM_INT32_NOT_SUPPORTED (DCGM_INT32_BLANK + 2)
Represents an error where fetching the INT32 value is not supported. - 表示获取 INT32 值不受支持的错误。
-
DCGM_INT64_NOT_SUPPORTED (DCGM_INT64_BLANK + 2)
Represents an error where fetching the INT64 value is not supported. - 表示获取 INT64 值不受支持的错误。
-
DCGM_FP64_NOT_SUPPORTED (DCGM_FP64_BLANK + 2.0)
Represents an error where fetching the FP64 value is not supported. - 表示获取 FP64 值不受支持的错误。
-
DCGM_STR_NOT_SUPPORTED "<<<NOT_SUPPORTED>>>"
Represents an error where fetching the STR value is not supported. - 表示获取 STR 值不受支持的错误。
-
DCGM_INT32_NOT_PERMISSIONED (DCGM_INT32_BLANK + 3)
Represents and error where fetching the INT32 value is not allowed with our current credentials. - 表示当前凭据不允许获取 INT32 值的错误。
-
DCGM_INT64_NOT_PERMISSIONED (DCGM_INT64_BLANK + 3)
Represents and error where fetching the INT64 value is not allowed with our current credentials. - 表示当前凭据不允许获取 INT64 值的错误。
-
DCGM_FP64_NOT_PERMISSIONED (DCGM_FP64_BLANK + 3.0)
Represents and error where fetching the FP64 value is not allowed with our current credentials. - 表示当前凭据不允许获取 FP64 值的错误。
-
DCGM_STR_NOT_PERMISSIONED "<<<NOT_PERM>>>"
Represents and error where fetching the STR value is not allowed with our current credentials. - 表示当前凭据不允许获取 STR 值的错误。
-
DCGM_INT8_IS_BLANK(val) (((val) >= DCGM_INT8_BLANK) ? 1 : 0)
Macro to check if a INT8 value is blank or not. - 检查 INT8 值是否为空白的宏。
-
DCGM_INT32_IS_BLANK(val) (((val) >= DCGM_INT32_BLANK) ? 1 : 0)
Macro to check if a INT32 value is blank or not. - 检查 INT32 值是否为空白的宏。
-
DCGM_INT64_IS_BLANK(val) (((val) >= DCGM_INT64_BLANK) ? 1 : 0)
Macro to check if a INT64 value is blank or not. - 检查 INT64 值是否为空白的宏。
-
DCGM_FP64_IS_BLANK(val) (((val) >= DCGM_FP64_BLANK ? 1 : 0))
Macro to check if a FP64 value is blank or not. - 检查 FP64 值是否为空白的宏。
-
DCGM_STR_IS_BLANK(val) (val == strstr(val, "<<<") && strstr(val, ">>>"))
Macro to check if a STR value is blank or not Works on (char *). - 检查 STR 值是否为空白的宏。适用于 (char *)。
Looks for <<< at first position and >>> inside string - 查找字符串开头位置的 <<< 和字符串内部的 >>>
-
DCGM_MAX_NUM_DEVICES 32 /* DCGM 2.0 and newer = 32. DCGM 1.8 and older = 16. */
Max number of GPUs supported by DCGM. - DCGM 支持的最大 GPU 数量。
-
DCGM_NVLINK_MAX_LINKS_PER_GPU 18
Number of NvLink links per GPU supported by DCGM 18 for Hopper, 12 for Ampere, 6 for Volta, and 4 for Pascal. - DCGM 支持的每个 GPU 的 NvLink 链路数量:Hopper 为 18,Ampere 为 12,Volta 为 6,Pascal 为 4。
-
DCGM_NVLINK_ERROR_COUNT 4
Number of nvlink errors supported by DCGM. - DCGM 支持的 nvlink 错误数量。
NVML_NVLINK_ERROR_DL_ECC_DATA not currently supported - 当前不支持 NVML_NVLINK_ERROR_DL_ECC_DATA
See also - 另请参阅
NVML_NVLINK_ERROR_COUNT
-
DCGM_HEALTH_WATCH_NVLINK_ERROR_NUM_FIELDS 4
Number of nvlink error types - nvlink 错误类型数量
See also - 另请参阅
NVML_NVLINK_ERROR_COUNT TODO: update with refactor of ampere-next nvlink APIs (JIRA DCGM-2628) - NVML_NVLINK_ERROR_COUNT TODO:使用 ampere-next nvlink API 的重构进行更新(JIRA DCGM-2628)
-
DCGM_NVLINK_MAX_LINKS_PER_GPU_LEGACY1 6
Maximum NvLink links pre-Ampere. - Ampere 之前的最大 NvLink 链路数。
-
DCGM_NVLINK_MAX_LINKS_PER_GPU_LEGACY2 12
Maximum NvLink links pre-Hopper. - Hopper 之前的最大 NvLink 链路数。
-
DCGM_MAX_NUM_SWITCHES 12
Max number of NvSwitches supported by DCGM. - DCGM 支持的最大 NvSwitch 数量。
-
DCGM_MAX_XID_INFO 10
Max number of XID info to store. - 要存储的最大 XID 信息数量。
-
DCGM_NVLINK_MAX_LINKS_PER_NVSWITCH 256
Number of NvLink links per NvSwitch supported by DCGM. - DCGM 支持的每个 NvSwitch 的 NvLink 链路数量。
-
DCGM_LANE_MAX_LANES_PER_NVSWICH_LINK 4
Number of Lanes per NvSwitch NvLink supported by DCGM. - DCGM 支持的每个 NvSwitch NvLink 的通道数。
-
DCGM_MAX_VGPU_INSTANCES_PER_PGPU 32
Maximum number of vGPU instances per physical GPU. - 每个物理 GPU 的最大 vGPU 实例数。
-
DCGM_MAX_NUM_CPUS 8
Max number of CPU nodes. - 最大 CPU 节点数。
-
DCGM_MAX_NUM_CPU_CORES 1024
Max number of CPUs. - 最大 CPU 核心数。
-
DCGM_MAX_STR_LENGTH 256
Max length of the DCGM string field. - DCGM 字符串字段的最大长度。
-
DCGM_MAX_AGE_USEC_DEFAULT 30000000
Default maximum age of samples kept (usec) - 保留样本的默认最大期限(微秒)
-
DCGM_MAX_CLOCKS 256
Max number of clocks supported for a device. - 设备支持的最大时钟数。
-
DCGM_MAX_NUM_GROUPS 64
Max limit on the number of groups supported by DCGM. - DCGM 支持的最大组数限制。
-
DCGM_MAX_FBC_SESSIONS 256
Max number of active FBC sessions. - 最大活动 FBC 会话数。
-
DCGM_VGPU_NAME_BUFFER_SIZE 64
Represents the size of a buffer that holds a vGPU type Name or vGPU class type or name of process running on vGPU instance. - 表示保存 vGPU 类型名称、vGPU 类类型或在 vGPU 实例上运行的进程名称的缓冲区大小。
-
DCGM_GRID_LICENSE_BUFFER_SIZE 128
Represents the size of a buffer that holds a vGPU license string. - 表示保存 vGPU 许可证字符串的缓冲区大小。
-
DCGM_CONFIG_COMPUTEMODE_DEFAULT 0
Default compute mode — multiple contexts per device. - 默认计算模式 — 每个设备多个上下文。
-
DCGM_CONFIG_COMPUTEMODE_PROHIBITED 1
Compute-prohibited mode — no contexts per device. - 计算禁止模式 — 每个设备没有上下文。
-
DCGM_CONFIG_COMPUTEMODE_EXCLUSIVE_PROCESS 2
Compute-exclusive-process mode — only one context per device, usable from multiple threads at a time. - 计算独占进程模式 — 每个设备只有一个上下文,可同时从多个线程使用。
-
DCGM_HE_PORT_NUMBER 5555
Default Port Number for DCGM Host Engine. - DCGM 主机引擎的默认端口号。
-
DCGM_GROUP_ALL_GPUS 0x7fffffff
Identifies for special DCGM groups. - 标识特殊的 DCGM 组。
-
DCGM_GROUP_ALL_NVSWITCHES 0x7ffffffe
-
DCGM_GROUP_ALL_INSTANCES 0x7ffffffd
-
DCGM_GROUP_ALL_COMPUTE_INSTANCES 0x7ffffffc
-
DCGM_GROUP_ALL_ENTITIES 0x7ffffffb
-
DCGM_GROUP_NULL 0x7ffffffa
-
DCGM_GROUP_MAX_ENTITIES_V1 64
每个实体组的最大实体数量。
-
DCGM_GROUP_MAX_ENTITIES_V2 1024
类型定义
-
typedef enum dcgmOperationMode_enum dcgmOperationMode_t
DCGM 的操作模式。
DCGM 可以在自动模式下运行,在该模式下,它在后台运行额外的线程来收集任何感兴趣的指标,并自动管理策略管理所需的任何操作。
DCGM 也可以在手动模式下运行,其执行由用户控制。在这种模式下,用户必须定期调用 API,例如 dcgmPolicyTrigger 和 dcgmUpdateAllFields,这些 API 告诉 DCGM 唤醒并执行数据收集以及策略管理所需的操作。
-
typedef enum dcgmOrder_enum dcgmOrder_t
当从查询返回多个值时,应以何种顺序返回?
-
typedef enum dcgmReturn_enum dcgmReturn_t
DCGM API 调用的返回值。
-
typedef enum dcgmGroupType_enum dcgmGroupType_t
GPU 组的类型。
-
typedef enumdcgmChipArchitecture_enum dcgmChipArchitecture_t
简化的芯片架构。
请注意,这些是为了匹配 nvmlChipArchitecture_t 而创建的,因此不是从 0 开始。
-
typedef enum dcgmConfigType_enum dcgmConfigType_t
表示要从 GPU 获取的配置类型。
-
typedef enum dcgmConfigPowerLimitType_enum dcgmConfigPowerLimitType_t
表示组中每个成员的功率上限。
枚举
-
enum dcgmOperationMode_enum
DCGM 的操作模式。
DCGM 可以在自动模式下运行,在该模式下,它在后台运行额外的线程来收集任何感兴趣的指标,并自动管理策略管理所需的任何操作。
DCGM 也可以在手动模式下运行,其执行由用户控制。在这种模式下,用户必须定期调用 API,例如 dcgmPolicyTrigger 和 dcgmUpdateAllFields,这些 API 告诉 DCGM 唤醒并执行数据收集以及策略管理所需的操作。
值
-
enumerator DCGM_OPERATION_MODE_AUTO
-
enumerator DCGM_OPERATION_MODE_MANUAL
-
enumerator DCGM_OPERATION_MODE_AUTO
-
enum dcgmOrder_enum
当从查询返回多个值时,应以何种顺序返回?
值
-
enumerator DCGM_ORDER_ASCENDING
首先返回时间戳最早(最低)的数据。
-
enumerator DCGM_ORDER_DESCENDING
首先返回时间戳最新(最高)的数据。
-
enumerator DCGM_ORDER_ASCENDING
-
enum dcgmReturn_enum
DCGM API 调用的返回值。
值
-
enumerator DCGM_ST_OK
成功。
-
enumerator DCGM_ST_BADPARAM
向函数传递了错误的参数。
-
enumerator DCGM_ST_GENERIC_ERROR
一个通用的、未指定的错误。
-
enumerator DCGM_ST_MEMORY
发生内存不足错误。
-
enumerator DCGM_ST_NOT_CONFIGURED
设置未配置。
-
enumerator DCGM_ST_NOT_SUPPORTED
功能不受支持。
-
enumerator DCGM_ST_INIT_ERROR
DCGM 初始化错误。
-
enumerator DCGM_ST_NVML_ERROR
当 NVML 返回错误时。
-
enumerator DCGM_ST_PENDING
对象处于其他操作的挂起状态。
-
enumerator DCGM_ST_UNINITIALIZED
对象处于未定义状态。
-
enumerator DCGM_ST_TIMEOUT
请求的操作超时。
-
enumerator DCGM_ST_VER_MISMATCH
接收到的 API 和理解的 API 之间的版本不匹配。
-
enumerator DCGM_ST_UNKNOWN_FIELD
未知的字段 ID。
-
enumerator DCGM_ST_NO_DATA
没有可用数据。
-
enumerator DCGM_ST_STALE_DATA
数据被认为是过时的。
-
enumerator DCGM_ST_NOT_WATCHED
缓存管理器未更新给定的字段 ID。
-
enumerator DCGM_ST_NO_PERMISSION
没有执行所需操作的权限。
-
enumerator DCGM_ST_GPU_IS_LOST
GPU 不再可访问。
-
enumerator DCGM_ST_RESET_REQUIRED
GPU 需要重置。
-
enumerator DCGM_ST_FUNCTION_NOT_FOUND
找不到请求的函数(仅绑定错误)
-
enumerator DCGM_ST_CONNECTION_NOT_VALID
与主机引擎的连接不再有效。
-
enumerator DCGM_ST_GPU_NOT_SUPPORTED
DCGM 不支持此 GPU。
-
enumerator DCGM_ST_GROUP_INCOMPATIBLE
所提供组的 GPU 彼此不兼容,无法执行请求的操作。
-
enumerator DCGM_ST_MAX_LIMIT
对象已达到最大限制。
-
enumerator DCGM_ST_LIBRARY_NOT_FOUND
找不到 DCGM 库。
-
enumerator DCGM_ST_DUPLICATE_KEY
传递给函数的键重复。
-
enumerator DCGM_ST_GPU_IN_SYNC_BOOST_GROUP
GPU 已是同步加速组的一部分。
-
enumerator DCGM_ST_GPU_NOT_IN_SYNC_BOOST_GROUP
GPU 不是同步加速组的一部分。
-
enumerator DCGM_ST_REQUIRES_ROOT
当主机引擎以非 root 用户身份运行时,无法执行此操作。
-
enumerator DCGM_ST_NVVS_ERROR
DCGM GPU 诊断已成功执行,但报告了一个错误。
-
enumerator DCGM_ST_INSUFFICIENT_SIZE
输入参数不够大。
-
enumerator DCGM_ST_FIELD_UNSUPPORTED_BY_API
调用的 API 不支持给定的字段 ID。
-
enumerator DCGM_ST_MODULE_NOT_LOADED
此请求由 DCGM 的一个当前未加载的模块提供服务。
-
enumerator DCGM_ST_IN_USE
由于受影响的资源正在使用中,因此无法完成请求的操作。
-
enumerator DCGM_ST_GROUP_IS_EMPTY
此组为空,请求的操作在空组上无效。
-
enumerator DCGM_ST_PROFILING_NOT_SUPPORTED
此 GPU 组或 GPU 不支持性能分析。
-
enumerator DCGM_ST_PROFILING_LIBRARY_ERROR
第三方性能分析模块返回了一个无法恢复的错误。
-
enumerator DCGM_ST_PROFILING_MULTI_PASS
请求的性能分析指标无法在单次传递中收集。
-
enumerator DCGM_ST_DIAG_ALREADY_RUNNING
一个诊断实例已在运行,在当前实例完成之前无法运行新的诊断。
-
enumerator DCGM_ST_DIAG_BAD_JSON
DCGM GPU 诊断返回了无法解析的 JSON。
-
enumerator DCGM_ST_DIAG_BAD_LAUNCH
启动 DCGM GPU 诊断时出错。
-
enumerator DCGM_ST_DIAG_UNUSED
未使用。
-
enumerator DCGM_ST_DIAG_THRESHOLD_EXCEEDED
字段值达到或超过了错误阈值。
-
enumerator DCGM_ST_INSUFFICIENT_DRIVER_VERSION
安装的驱动程序版本不足以支持此 API。
-
enumerator DCGM_ST_INSTANCE_NOT_FOUND
指定的 GPU 实例不存在。
-
enumerator DCGM_ST_COMPUTE_INSTANCE_NOT_FOUND
指定的 GPU 计算实例不存在。
-
enumerator DCGM_ST_CHILD_NOT_KILLED
在重试次数内无法终止子进程。
-
enumerator DCGM_ST_3RD_PARTY_LIBRARY_ERROR
在第三方库中检测到错误。
-
enumerator DCGM_ST_INSUFFICIENT_RESOURCES
没有足够的可用资源。
-
enumerator DCGM_ST_PLUGIN_EXCEPTION
从诊断插件抛出的异常。
-
enumerator DCGM_ST_NVVS_ISOLATE_ERROR
诊断返回了一个错误,指示需要隔离。
-
enumerator DCGM_ST_NVVS_BINARY_NOT_FOUND
指定的位置找不到 NVVS 二进制文件。
-
enumerator DCGM_ST_NVVS_KILLED
NVVS 进程被信号终止。
-
enumerator DCGM_ST_PAUSED
hostengine 和所有模块都已暂停。
-
enumerator DCGM_ST_ALREADY_INITIALIZED
对象已初始化。
-
enumerator DCGM_ST_NVML_NOT_LOADED
由于 NVML 未加载,无法执行操作。
-
enumerator DCGM_ST_NVML_DRIVER_TIMEOUT
由于检测到 NVML 驱动程序超时错误,无法执行操作。
-
enumerator DCGM_ST_NVVS_NO_AVAILABLE_TEST
NVVS 返回没有可用的测试 (NVVS_ST_TEST_NOT_FOUND)
-
enumerator DCGM_ST_OK
-
enum dcgmGroupType_enum
GPU 组的类型。
值
-
enumerator DCGM_GROUP_DEFAULT
节点上的所有 GPU 都添加到组中。
-
enumerator DCGM_GROUP_EMPTY
创建一个空组。
-
enumerator DCGM_GROUP_DEFAULT_NVSWITCHES
节点的所有 NvSwitches 都添加到组中。
-
enumerator DCGM_GROUP_DEFAULT_INSTANCES
节点的所有 GPU 实例都添加到组中。
-
enumerator DCGM_GROUP_DEFAULT_COMPUTE_INSTANCES
节点的所有计算实例都添加到组中。
-
enumerator DCGM_GROUP_DEFAULT_EVERYTHING
所有实体都添加到此默认组中。
-
enumerator DCGM_GROUP_DEFAULT
-
enum dcgmChipArchitecture_enum
简化的芯片架构。
请注意,这些是为了匹配 nvmlChipArchitecture_t 而创建的,因此不是从 0 开始。
值
-
enumerator DCGM_CHIP_ARCH_OLDER
所有早于 Kepler 架构的 GPU。
-
enumerator DCGM_CHIP_ARCH_KEPLER
所有 Kepler 架构的部件。
-
enumerator DCGM_CHIP_ARCH_MAXWELL
所有 Maxwell 架构的部件。
-
enumerator DCGM_CHIP_ARCH_PASCAL
所有 Pascal 架构的部件。
-
enumerator DCGM_CHIP_ARCH_VOLTA
所有 Volta 架构的部件。
-
enumerator DCGM_CHIP_ARCH_TURING
所有 Turing 架构的部件。
-
enumerator DCGM_CHIP_ARCH_AMPERE
所有 Ampere 架构的部件。
-
enumerator DCGM_CHIP_ARCH_ADA
所有 Ada 架构的部件。
-
enumerator DCGM_CHIP_ARCH_HOPPER
所有 Hopper 架构的部件。
-
enumerator DCGM_CHIP_ARCH_BLACKWELL
所有 Blackwell 架构的部件。
-
enumerator DCGM_CHIP_ARCH_COUNT
将此项保留为倒数第二项,排除未知项。
-
enumerator DCGM_CHIP_ARCH_UNKNOWN
任何其他架构,大概是更新的架构。
-
enumerator DCGM_CHIP_ARCH_OLDER
函数
-
const char *errorString(dcgmReturn_t result)
-
MAKE_DCGM_VERSION(typeName, ver) (unsigned int)(sizeof(typeName) | ((unsigned long)(ver) << 24U))