blob: 3890e68c4585ae33db5ab2cf5b7573db8ce1659f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
diff --git a/dynolog/src/gpumon/Utils.h b/dynolog/src/gpumon/Utils.h
index 0728cdc..844076d 100644
--- a/dynolog/src/gpumon/Utils.h
+++ b/dynolog/src/gpumon/Utils.h
@@ -1,19 +1,20 @@
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
#pragma once
+#include <unistd.h>
#include <string>
#include <unordered_map>
#include <vector>
namespace dynolog {
// Assume at most one pid running on each gpu device_id
// Result[i] is the pid running on device_id i,
// or -1 if no process is running
std::vector<pid_t> getPidsOnGpu();
// Input map is type <environment variable name, metadata name>
// output map is type <metadata name, metadata value>
std::unordered_map<std::string, std::string> getMetadataForPid(
pid_t pid,
const std::unordered_map<std::string, std::string>& keysMap);
|