Skip to content

Commit

Permalink
cpuid: detecting avx512-fp16
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Jan 18, 2024
1 parent 2d91a3f commit 3ffbc2d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Sources/Core/CpuID.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ namespace spades {
case CpuFeature::AVX512ER: return (featureXcr0Avx512 && subfeature & (1U << 27));
case CpuFeature::AVX512PF: return (featureXcr0Avx512 && subfeature & (1U << 26));
case CpuFeature::AVX512F: return (featureXcr0Avx512 && subfeature & (1U << 16));
case CpuFeature::AVX512FP16: return (featureXcr0Avx512 && subfeature & (1U << 23));
case CpuFeature::SimultaneousMT: return featureEdx & (1U << 28);
}
}
Expand Down
1 change: 1 addition & 0 deletions Sources/Core/CpuID.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace spades {
AVX512ER,
AVX512PF,
AVX512F,
AVX512FP16,
SimultaneousMT
};

Expand Down
2 changes: 2 additions & 0 deletions Sources/Gui/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,8 @@ int main(int argc, char **argv) {
SPLog("Supports AVX2: %s", cpuid.Supports(spades::CpuFeature::AVX2) ? "YES" : "NO");
SPLog("Supports AVX512F: %s",
cpuid.Supports(spades::CpuFeature::AVX512F) ? "YES" : "NO");
SPLog("Supports AVX512FP16: %s",
cpuid.Supports(spades::CpuFeature::AVX512FP16) ? "YES" : "NO");
SPLog("Supports AVX512CD: %s",
cpuid.Supports(spades::CpuFeature::AVX512CD) ? "YES" : "NO");
SPLog("Supports AVX512ER: %s",
Expand Down

0 comments on commit 3ffbc2d

Please sign in to comment.