Fix [Not supported] status for get_compute_process_info_by_pid

On some systems [rocm-smi --showpids] reports
get_compute_process_info_by_pid, Not supported on the given system
[PID] [PROCESS NAME] 1 UNKNOWN UNKNOWN UNKNOWN

get_compute_process_info_by_pid fails because cu_occupancy debugfs method
is not provided on some graphics cards and GFX revisions by design

Proposing a change to return success status when only cu_occupancy debugfs method
is not found and provide cu_occupancy invalidation value to mark only
this parameter as UNKNOWN

Change-Id: Iae37070d9bd19483b4e6c8ee24c7d9a4c92f00d7
Signed-off-by: Vladimir Stempen <Vladimir.Stempen@amd.com>
Reviewed-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
このコミットが含まれているのは:
Vladimir Stempen authored and Dmitrii Galantsev committed 2024-02-13 18:17:47 -05:00
1 親 de9eaaac8c
コミット 677433b367
3ファイル変更
+10 -3

検索条件に一致するファイルはありません

+2
ファイルの表示
@@ -1134,6 +1134,8 @@ typedef struct {
uint32_t cu_occupancy; //!< Compute Unit usage in percent
} rsmi_process_info_t;
//! CU occupancy invalidation value for the GFX revisions not providing cu_occupancy debugfs method
#define CU_OCCUPANCY_INVALID 0xFFFFFFFF
/**
* @brief Opaque handle to function-support object