summaryrefslogtreecommitdiff
path: root/src/utilities/device_mapping.hpp
blob: c814622fafe866d27b14e03e21c4e58e184a4b67 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// =================================================================================================
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
// width of 100 characters per line.
//
// Author(s):
//   Cedric Nugteren <www.cedricnugteren.nl>
//
// This file describes the mappings of extracted names from OpenCL (device, board, vendor, etc.) to
// more commonly used names to match devices from different vendors and platforms properly.
//
// =================================================================================================

#ifndef CLBLAST_UTILITIES_DEVICE_MAPPING_H_
#define CLBLAST_UTILITIES_DEVICE_MAPPING_H_

#include <string>
#include <unordered_map>

namespace clblast {
// A special namespace to hold all the global constant variables
namespace device_mapping {

// =================================================================================================

// Alternative names for some vendor names (top-level)
const std::unordered_map<std::string, std::string> kVendorNames {
  { "Intel(R) Corporation", "Intel" },
  { "GenuineIntel", "Intel" },
  { "Advanced Micro Devices, Inc.", "AMD" },
  { "NVIDIA Corporation", "NVIDIA" },
};

// Alternative names for some architectures (mid-level)
const std::unordered_map<std::string, std::string> kArchitectureNames {
  {"gfx803", "Fiji"},
  {"gfx900", "Vega"},
};

// Alternative names for some devices (low-level)
const std::unordered_map<std::string, std::string> kDeviceNames {
  // Empty
};

// Things to remove from device names (low-level)
const std::vector<std::string> kDeviceRemovals {
  "pthread-"
};

// =================================================================================================
} // namespace device_mapping
} // namespace clblast

// CLBLAST_UTILITIES_DEVICE_MAPPING_H_
#endif