[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user