geopm  3.1.1.dev214+gba4f9f6d
GEOPM - Global Extensible Open Power Manager
LevelZeroGPUTopo.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 LEVELZEROGPUTOPO_HPP_INCLUDE
7 #define LEVELZEROGPUTOPO_HPP_INCLUDE
8 
9 #include <cstdint>
10 #include <vector>
11 #include <set>
12 
13 #include "GPUTopo.hpp"
14 
15 namespace geopm
16 {
17  class LevelZeroDevicePool;
18 
19  class LevelZeroGPUTopo : public GPUTopo
20  {
21  public:
23  LevelZeroGPUTopo(const LevelZeroDevicePool &device_pool,
24  const int num_cpu);
25  virtual ~LevelZeroGPUTopo() = default;
26  int num_gpu(void) const override;
27  int num_gpu(int domain) const override;
28  std::set<int> cpu_affinity_ideal(int gpu_idx) const override;
29  std::set<int> cpu_affinity_ideal(int domain, int gpu_idx) const override;
30  private:
31  const LevelZeroDevicePool &m_levelzero_device_pool;
32  std::vector<std::set<int> > m_cpu_affinity_ideal;
33  std::vector<std::set<int> > m_cpu_affinity_ideal_chip;
34  };
35 }
36 #endif
Definition: GPUTopo.hpp:16
Definition: LevelZeroDevicePool.hpp:19
Definition: LevelZeroGPUTopo.hpp:20
virtual ~LevelZeroGPUTopo()=default
int num_gpu(void) const override
Number of GPUs on the platform.
Definition: LevelZeroGPUTopo.cpp:74
LevelZeroGPUTopo()
Definition: LevelZeroGPUTopo.cpp:16
std::set< int > cpu_affinity_ideal(int gpu_idx) const override
CPU Affinitization set for a particular GPU.
Definition: LevelZeroGPUTopo.cpp:96
Definition: Agg.cpp:20