36 if (version.find(
"G720") != std::string::npos)
40 else if (version.find(
"G620") != std::string::npos)
52 if (version.find(
"G77") != std::string::npos)
56 else if (version.find(
"G57") != std::string::npos)
60 if (version.find(
"G68") != std::string::npos)
64 if (version.find(
"G78AE") != std::string::npos)
68 if (version.find(
"G78") != std::string::npos)
72 else if (version.find(
"G710") != std::string::npos)
76 else if (version.find(
"G610") != std::string::npos)
80 else if (version.find(
"G510") != std::string::npos)
84 else if (version.find(
"G310") != std::string::npos)
88 else if (version.find(
"G715") != std::string::npos)
92 else if (version.find(
"G615") != std::string::npos)
104 if (version.find(
"G71") != std::string::npos)
108 else if (version.find(
"G72") != std::string::npos)
112 else if (version.find(
"G51BIG") != std::string::npos)
116 else if (version.find(
"G51LIT") != std::string::npos)
120 else if (version.find(
"G51") != std::string::npos)
124 else if (version.find(
"G52LIT") != std::string::npos)
128 else if (version.find(
"G52") != std::string::npos)
132 else if (version.find(
"G76") != std::string::npos)
136 else if (version.find(
"G31") != std::string::npos)
148 if (version.find(
"T600") != std::string::npos)
152 else if (version.find(
"T700") != std::string::npos)
156 else if (version.find(
"T800") != std::string::npos)
171 static std::map<GPUTarget, const std::string> gpu_target_map = {
185 return gpu_target_map[target];
190 std::regex mali_regex(R
"(Mali-(.*))");
191 std::smatch name_parts;
192 const bool found_mali = std::regex_search(device_name, name_parts, mali_regex);
200 const char target = name_parts.str(1)[0];
201 const std::string &version = name_parts.str(1);
203 std::regex future_regex(R
"(.*X)");
204 const bool is_future_gpu = std::regex_search(version, future_regex);
208 if (target ==
'G' || is_future_gpu)
211 gpu_target = get_fifth_gen_target(version);
214 gpu_target = get_valhall_target(version);
219 gpu_target = get_bifrost_target(version);
228 else if (target ==
'T')
230 gpu_target = get_midgard_target(version);