Skip to content

Commit

Permalink
Add alder lake to processor list (JuliaLang#44696)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaraldi authored May 11, 2022
1 parent bc0fae2 commit 1ce1fb0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/features_x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ JL_FEATURE_DEF(clzero, 32 * 8 + 0, 0)
JL_FEATURE_DEF(wbnoinvd, 32 * 8 + 9, 0)

// EAX=7,ECX=1: EAX
JL_FEATURE_DEF(avxvnni, 32 * 9 + 4, 120000)
JL_FEATURE_DEF(avx512bf16, 32 * 9 + 5, 0)

// EAX=0x14,ECX=0: EBX
Expand Down
10 changes: 10 additions & 0 deletions src/processor_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ enum class CPU : uint32_t {
intel_corei7_icelake_client,
intel_corei7_icelake_server,
intel_corei7_tigerlake,
intel_corei7_alderlake,
intel_corei7_sapphirerapids,
intel_knights_landing,
intel_knights_mill,
Expand Down Expand Up @@ -136,6 +137,7 @@ static constexpr FeatureDep deps[] = {
{vaes, aes},
{vpclmulqdq, avx},
{vpclmulqdq, pclmul},
{avxvnni, avx2},
{avx512f, avx2},
{avx512dq, avx512f},
{avx512ifma, avx512f},
Expand Down Expand Up @@ -202,6 +204,8 @@ constexpr auto icelake = cannonlake | get_feature_masks(avx512bitalg, vaes, avx5
constexpr auto icelake_server = icelake | get_feature_masks(pconfig, wbnoinvd);
constexpr auto tigerlake = icelake | get_feature_masks(avx512vp2intersect, movdiri,
movdir64b, shstk);
constexpr auto alderlake = skylake | get_feature_masks(clwb, sha, waitpkg, shstk, gfni, vaes, vpclmulqdq, pconfig,
rdpid, movdiri, pku, movdir64b, serialize, ptwrite, avxvnni);
constexpr auto sapphirerapids = icelake_server |
get_feature_masks(amx_tile, amx_int8, amx_bf16, avx512bf16, serialize, cldemote, waitpkg,
ptwrite, tsxldtrk, enqcmd, shstk, avx512vp2intersect, movdiri, movdir64b);
Expand Down Expand Up @@ -255,6 +259,8 @@ static constexpr CPUSpec<CPU, feature_sz> cpus[] = {
Feature::icelake_server},
{"tigerlake", CPU::intel_corei7_tigerlake, CPU::intel_corei7_icelake_client, 100000,
Feature::tigerlake},
{"alderlake", CPU::intel_corei7_alderlake, CPU::intel_corei7_skylake, 120000,
Feature::alderlake},
{"sapphirerapids", CPU::intel_corei7_sapphirerapids, CPU::intel_corei7_icelake_server, 120000,
Feature::sapphirerapids},

Expand Down Expand Up @@ -411,6 +417,10 @@ static CPU get_intel_processor_name(uint32_t family, uint32_t model, uint32_t br
case 0x8c:
case 0x8d:
return CPU::intel_corei7_tigerlake;
//Alder Lake
case 0x97:
case 0x9a:
return CPU::intel_corei7_alderlake;

// Sapphire Rapids
case 0x8f:
Expand Down

0 comments on commit 1ce1fb0

Please sign in to comment.