Skip to content

cpu: x64: xbyak: update third-party xbyak to v7.37#5082

Open
georgen117 wants to merge 1 commit intorls-v3.12from
georgen/rls_3_12_update_xbyak_7_37
Open

cpu: x64: xbyak: update third-party xbyak to v7.37#5082
georgen117 wants to merge 1 commit intorls-v3.12from
georgen/rls_3_12_update_xbyak_7_37

Conversation

@georgen117
Copy link
Copy Markdown
Contributor

Cherry-pick of PR #5081

x64: cpu: xbyak: update third-party xbyak to v7.37

Resolves MFDNN-14982

Overview

Updates the oneDNN vendored copy of Xbyak from v7.35.4 to v7.37. The update is applied as a cherry-picked diff on top of the existing oneDNN-specific modifications (Intel copyright headers, etc.) so all local changes are preserved.

xbyak_bin2hex.h is unchanged between the two versions.

Changes included in this update

xbyak.h

  • Allow users to pre-define XBYAK64_WIN / XBYAK64_GCC externally before including the header (guard the auto-detection with #if !defined(...)).
  • Bump the VERSION constant to 0x7370.
  • Replace direct sysconf(_SC_PAGESIZE) call with inner::getPageSize() in setProtectModeRW for consistency with the rest of the codebase.

xbyak_mnemonic.h

  • Bump getVersionString() return value to "7.37".
  • Remove Xeon Phi–only mnemonics: prefetchwt1, v4fmaddps, v4fmaddss, v4fnmaddps, v4fnmaddss, vp4dpwssd, vp4dpwssds.

xbyak_util.h

  • Include <sched.h> on non-Windows platforms.
  • Deprecate Xeon Phi–only CPU feature flags (tAVX512PF, tAVX512ER, tAVX512_4VNNIW, tAVX512_4FMAPS, tPREFETCHWT1) and remove their CPUID detection.
  • Add tAMX_COMPLEX detection (AMX-COMPLEX, CPUID leaf 7 sub-leaf 1 EDX[8]).
  • Add getCoreType() using CPUID leaf 0x1A as a fallback for P-core/E-core detection on hybrid CPUs.
  • Windows: introduce XBYAK_WINSDK_HAS_* versioning macros so the code compiles correctly across a range of Windows SDK versions (pre-Win7, Win7+, Win10+, Win10 20H1+). Undefine macros after use to avoid pollution.
  • Windows: add getCoreTypeForAffinity() for hybrid core-type detection on SDKs that lack EfficiencyClass.
  • Windows: refactor convertMask() to work with both the old GroupMask field and the newer GroupMasks[] array.
  • Linux: add setAffinityAndGetCoreType() helper for hybrid detection.
  • Refactor StackFrame/AutoSave register allocation with a RegSlot-based table that correctly handles the Windows and Linux calling conventions, fixing register backup/restore order and rsp reference in the frame epilogue.

oneDNN specific comments on update

For oneDNN the important part of the update is the addition of the Windows SDK versioning macros. This addresses the build failure reported MFDNN-14982 when trying to build oneDNN with an older Windows SDK.

Xbyak has depricated support for Xeon Phi. This resulted in the removal of several mnemonic instructions: prefetchwt1, four v4f[n]madd{p|s}s instructions, and two vp4dpwssd[s] instructions. None of these instructions are used by oneDNN so there deprication does not affect oneDNN. It also resulted in removal of the detection of CPUID features: tAVX512PF, tAVX512ER,
tAVX512_4VNNIW, tAVX512_4FMAPS, and tPREFETCHWT1. I was unable to find a single instance of oneDNN checking for the Xeon Phi CPUID features.

The StackFrame code found in xbyak_util.h is not used by oneDNN so the updates to that code does not affect oneDNN.

Testing

Configuration Build ctest
Release ✅ passed ✅ 227/227 passed
Debug ✅ passed ✅ 227/227 passed

@georgen117
Copy link
Copy Markdown
Contributor Author

make test
set test_scope=NIGHTLY
disable compiler_gnu9
disable compiler_icx-previous
disable compiler_icx-oss
disable build_vendor_amd
disable build_vendor_nvidia
disable build_graph
disable build_cpu_runtime_tbb
disable build_cpu_runtime_sycl
disable build_gpu_runtime_sycl
disable build_gpu_runtime_ocl
disable build_mode_no_cpu
disable test_device_gpu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant