[SWDEV-525336] Filter out amd-smi process itself from detection (#638)

* Filter out amd-smi from process detection
* Fixed N/A stripping N/ incorrectly from running elevated processes

Signed-off-by: adapryor <Adam.pryor@amd.com>
This commit is contained in:
Pryor, Adam
2025-08-21 11:41:03 -05:00
committed by GitHub
parent ffca095246
commit ad29de4238
2 changed files with 9 additions and 2 deletions
+6
View File
@@ -327,6 +327,12 @@ int GetProcessGPUs(uint32_t pid, std::unordered_set<uint64_t> *gpu_set) {
if (gpu_set == nullptr) {
return RSMI_STATUS_INVALID_ARGS;
}
// Skip amd-smi process itself
if (pid == static_cast<uint32_t>(getpid())) {
return 0;
}
errno = 0;
std::string queues_dir = kKFDProcPathRoot;