Skip to content

Commit 1c4ec47

Browse files
author
Chip Kerchner
committed
Merge branch 'XLC-AIX' of github.ibm.com:PowerAppLibs/openblas into XLC-AIX
2 parents 4dc435b + 2d0b233 commit 1c4ec47

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

driver/others/dynamic_power.c

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,27 @@ static int __builtin_cpu_supports(char* arg)
233233
}
234234
return 0;
235235
}
236+
237+
static int __builtin_cpu_is(char *arg)
238+
{
239+
static int ipinfo = -1;
240+
if (ipinfo < 0) {
241+
ipinfo = cpuid();
242+
}
243+
if (ipinfo == CPU_POWER10) {
244+
if (!strcmp(arg, "power10")) return 1;
245+
} else if (ipinfo == CPU_POWER9) {
246+
if (!strcmp(arg, "power9")) return 1;
247+
} else if (ipinfo == CPU_POWER8) {
248+
if (!strcmp(arg, "power8")) return 1;
249+
} else if (ipinfo == CPU_POWER6) {
250+
if (!strcmp(arg, "power6")) return 1;
251+
} else {
252+
return 0;
253+
}
254+
}
236255
#endif
237-
#endif
256+
#endif /* _AIX */
238257

239258
static gotoblas_t *get_coretype(void) {
240259

0 commit comments

Comments
 (0)