Skip to content

Commit 3985a75

Browse files
committed
Fix
1 parent 27a7d5a commit 3985a75

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/plugins/intel_npu/src/compiler_adapter/include/mem_usage.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#pragma once
77

8+
#include <cstdint>
9+
810
namespace intel_npu {
911
int64_t get_peak_memory_usage();
1012
}

src/plugins/intel_npu/src/compiler_adapter/src/mem_usage.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
#include "mem_usage.hpp"
44

5-
namespace intel_npu {
6-
75
#if defined _WIN32
86

97
#include <windows.h>
108
#include <psapi.h>
9+
#include <cmath>
1110

12-
int64_t get_peak_memory_usage() {
11+
int64_t intel_npu::get_peak_memory_usage() {
1312
PROCESS_MEMORY_COUNTERS mem_counters;
1413
if (!GetProcessMemoryInfo(GetCurrentProcess(), &mem_counters, sizeof(mem_counters))) {
1514
throw std::runtime_error("Can't get system memory values");
@@ -35,8 +34,8 @@ int64_t get_peak_memory_usage() {
3534
#include <regex>
3635
#include <sstream>
3736

38-
int64_t get_peak_memory_usage() {
39-
size_t peak_mem_usage_kB = 0;
37+
int64_t intel_npu::get_peak_memory_usage() {
38+
std::size_t peak_mem_usage_kB = 0;
4039

4140
std::ifstream status_file("/proc/self/status");
4241
std::string line;
@@ -61,4 +60,3 @@ int64_t get_peak_memory_usage() {
6160
}
6261

6362
#endif
64-
}

0 commit comments

Comments
 (0)