Thanks to visit codestin.com
Credit goes to github.com

Skip to content

WIP: MAINT: Modulate dispatched x86 CPU features #28896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

seiko2plus
Copy link
Member

Background

As we move to Highway, our CPU feature dispatching system needs to be updated. The current hybrid approach (feature & group-based) is no longer suitable, and certain features like AMD legacy extensions and Xeon Phi support need to be removed. Additionally, since we're in 2025, it's reasonable to raise our baseline requirement to SSE4.1.

Changes

This PR implements the following modifications to the CPU feature dispatching system:

  • Removed individual feature dispatching for:

    • Base SSE features (SSE, SSE2, SSSE3) - still accessible via SSE41 and higher
    • AMD legacy features (XOP, FMA4)
    • Individual POPCNT and SSE42 - now available through new SSE4_COMMON group
    • Individual AVX-family features (AVX2, FMA3, F16C, AVX) - now available through new AVX2_COMMON group
    • Individual AVX512F and AVX512CD - accessible via AVX512_SKX and higher
  • Dropped support for:

    • Xeon Phi groups (AVX512_KNL, AVX512_KNM) - discontinued by Intel
    • AVX512_CLX and AVX512_CNL - not supported by Highway (features available via AVX512_ICL)

New Feature Group Hierarchy

Name Implies Gathers
SSE41 SSE SSE2 SSE3 SSSE3
SSE4_COMMON (new) SSE41 POPCNT SSE42 AES PCLMULQDQ
AVX2_COMMON (new) SSE4_COMMON AVX2 BMI BMI2 FMA3
AVX512_SKX AVX2_COMMON AVX512F AVX512CD AVX512VL AVX512BW AVX512DQ
AVX512_ICL AVX512_SKX AVX512VBMI AVX512VBMI2 AVX512VNNI AVX512BITALG AVX512VPOPCNTDQ VAES GFNI VPCLMULQDQ
AVX512_SPR AVX512_ICL AVX512FP16

Restructure CPU feature dispatching to align with Highway requirements by:
- Raising baseline to SSE41 (appropriate for 2025)
- Removing AMD legacy features (XOP, FMA4)
- Dropping Xeon Phi support (AVX512_KNL, AVX512_KNM)
- Creating new feature groups:
  * SSE4_COMMON: combines POPCNT, SSE42, AES, PCLMULQDQ
  * AVX2_COMMON: combines AVX2, BMI, BMI2, FMA3
- Replacing individual feature dispatching with hierarchical groups
- Removing AVX512_CLX/CNL (features available via AVX512_ICL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant