geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
SSTFrequencyLimitDetector.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2024 Intel Corporation
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef SSTFREQUENCYLIMITDETECTOR_HPP_INCLUDE
7 #define SSTFREQUENCYLIMITDETECTOR_HPP_INCLUDE
8 
10 
11 #include <memory>
12 #include <utility>
13 #include <vector>
14 
15 namespace geopm
16 {
18  {
19  public:
21  PlatformIO &platform_io,
22  const PlatformTopo &platform_topo);
24  const std::vector<double> &observed_core_frequencies) override;
25  std::vector<std::pair<unsigned int, double> > get_core_frequency_limits(
26  unsigned int core_idx) const override;
27  double get_core_low_priority_frequency(unsigned int core_idx) const override;
28 
29  private:
30  // Return true if the given frequency is limited or almost limited
31  // by the given limit.
32  bool is_frequency_near_limit(double frequency, double limit);
33 
34  PlatformIO &m_platform_io;
35  unsigned int m_package_count;
36  size_t m_core_count;
37  std::vector<int> m_clos_association_signals;
38  std::vector<int> m_frequency_limit_signals;
39  std::vector<int> m_sst_tf_enable_signals;
40  const double M_CPU_FREQUENCY_MAX;
41  const double M_CPU_FREQUENCY_STICKER;
42  const double M_CPU_FREQUENCY_STEP;
43  const double M_ALL_CORE_TURBO_FREQUENCY;
44  std::vector<unsigned int> m_bucket_hp_cores;
45  const double M_LOW_PRIORITY_SSE_FREQUENCY;
46  const double M_LOW_PRIORITY_AVX2_FREQUENCY;
47  const double M_LOW_PRIORITY_AVX512_FREQUENCY;
48 
49  // Vectors of license level frequency limits by bucket number
50  std::vector<double> m_bucket_sse_frequency;
51  std::vector<double> m_bucket_avx2_frequency;
52  std::vector<double> m_bucket_avx512_frequency;
53  std::vector<std::pair<unsigned int, double> > m_sse_hp_tradeoffs;
54  std::vector<std::pair<unsigned int, double> > m_avx2_hp_tradeoffs;
55  std::vector<std::pair<unsigned int, double> > m_avx512_hp_tradeoffs;
56  std::vector<std::vector<int> > m_cores_in_packages;
57  std::vector<std::vector<std::pair<unsigned int, double> > > m_core_frequency_limits;
58  std::vector<double> m_core_lp_frequencies;
59  };
60 }
61 
62 #endif
Detect maximum achievable frequency limits of CPU cores.
Definition: FrequencyLimitDetector.hpp:24
Definition: SSTFrequencyLimitDetector.hpp:18
void update_max_frequency_estimates(const std::vector< double > &observed_core_frequencies) override
Update the estimates for maximum achievable core frequencies.
Definition: SSTFrequencyLimitDetector.cpp:111
std::vector< std::pair< unsigned int, double > > get_core_frequency_limits(unsigned int core_idx) const override
Estimate the maximum achievable frequencies of a given core.
Definition: SSTFrequencyLimitDetector.cpp:194
SSTFrequencyLimitDetector(PlatformIO &platform_io, const PlatformTopo &platform_topo)
Definition: SSTFrequencyLimitDetector.cpp:27
double get_core_low_priority_frequency(unsigned int core_idx) const override
Estimate the low priority frequency of a given core.
Definition: SSTFrequencyLimitDetector.cpp:199
Definition: Accumulator.cpp:12