2
0

Add function for parse CPUID information

Used to detect whether mwaitx instruction is supported

Change-Id: I66fe906325aa523c8815133cf782df3a17a7edab
Este cometimento está contido em:
David Yat Sin
2023-02-16 14:54:29 +00:00
ascendente d0330d7958
cometimento 0ed1568afc
4 ficheiros modificados com 48 adições e 1 eliminações
+7 -1
Ver ficheiro
@@ -1396,8 +1396,14 @@ Runtime::Runtime()
kfd_version{0} {}
hsa_status_t Runtime::Load() {
flag_.Refresh();
os::cpuid_t cpuinfo;
// Assume features are not supported if parse CPUID fails
if (!os::ParseCpuID(&cpuinfo)) {
fprintf(stderr, "Failed to parse CPUID\n");
}
flag_.Refresh();
g_use_interrupt_wait = flag_.enable_interrupt();
if (!AMD::Load()) {