From 19725abbf4966b3aca2e596926243725bd4883f9 Mon Sep 17 00:00:00 2001 From: Yazen AL Musaffar Date: Wed, 28 Jan 2026 22:34:20 -0600 Subject: [PATCH] [SWDEV-560702] Per process MEM usages does not add up to per GPU MEM usage. (#2888) * Update pyhton docs for process memory usage * Added comment for processes total memory usage --------- Signed-off-by: yalmusaf --- projects/amdsmi/docs/reference/amdsmi-py-api.md | 4 +++- projects/amdsmi/include/amd_smi/amdsmi.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/amdsmi/docs/reference/amdsmi-py-api.md b/projects/amdsmi/docs/reference/amdsmi-py-api.md index 156282e326..f3ccef3265 100644 --- a/projects/amdsmi/docs/reference/amdsmi-py-api.md +++ b/projects/amdsmi/docs/reference/amdsmi-py-api.md @@ -1426,7 +1426,7 @@ Field | Description ---|--- `name` | Name of process. If user does not have permission this will be "N/A" `pid` | Process ID -`mem` | Total memory usage by GPU during process in Bytes +`mem` | Total memory usage by GPU during process in Bytes (sum of the process memory is not expected to be the total memory usage.) `engine_usage` |
Subfield Description
`gfx`GFX engine usage in ns
`enc`Encode engine usage in ns
`memory_usage` |
Subfield Description
`gtt_mem`GTT memory usage in Bytes
`cpu_mem`CPU memory usage in Bytes
`vram_mem`Process VRAM memory usage in Bytes
`cu_occupancy` | Number of Compute Units utilized @@ -4224,6 +4224,8 @@ Field | Description `cu_occupancy` | Compute Unit usage in percents `evicted_time` | Time that queues are evicted on a GPU in milliseconds +note: Sum of the process memory is not expected to be the total memory usage. + Exceptions that can be thrown by `amdsmi_get_gpu_compute_process_info` function: * `AmdSmiLibraryException` diff --git a/projects/amdsmi/include/amd_smi/amdsmi.h b/projects/amdsmi/include/amd_smi/amdsmi.h index f316a147ff..27b4dd58fc 100644 --- a/projects/amdsmi/include/amd_smi/amdsmi.h +++ b/projects/amdsmi/include/amd_smi/amdsmi.h @@ -2165,6 +2165,7 @@ typedef struct { /** * @brief This structure contains information specific to a process. + * Sum of the process memory is not expected to be the total memory usage. * * @cond @tag{gpu_bm_linux} @endcond */ @@ -6791,7 +6792,7 @@ amdsmi_get_violation_status(amdsmi_processor_handle processor_handle, /** * @brief Returns the list of process information running on a given GPU. * If pdh.dll is not present on the system, this API returns - * AMDSMI_STATUS_NOT_SUPPORTED. + * AMDSMI_STATUS_NOT_SUPPORTED. Sum of the process memory is not expected to be the total memory usage. * * @ingroup tagProcessInfo *