Switch matrix parallel to task stealing, type and wrap are refacored, thread execution core has not yet
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# SIMDID (x86-64) 64-bit Specification (Completed per fixed layout)
|
||||
|
||||
This document completes the **64-bit SIMDID** bit layout as specified, with emphasis on the design of the **AVX512 Feature section ([31..16])**, so it can cover the messy AVX-512 subsets while keeping branching logic compact. It also allocates an **AVX Feature byte** adjacent to the AVX512/AMX regions for AVX-family capabilities.
|
||||
This document completes the **64-bit SIMDID** bit layout as specified, with emphasis on the design of the **AVX512 Feature section ([31..16])**, so it can cover the messy AVX-512 subsets while keeping branching logic compact. It also allocates an **AVX Feature byte** adjacent to the AVX512/AMX regions for AVX-family capabilities, and an **AVX10 Feature byte** for the converged AVX10 ISA.
|
||||
|
||||
> Convention: bit0 is the least significant bit (LSB). Only x86-64 interpreter semantics are defined here; the header’s Root ISA allows extension to other architectures.
|
||||
> Convention: bit0 is the least significant bit (LSB). Only x86-64 interpreter semantics are defined here; the header's Root ISA allows extension to other architectures.
|
||||
|
||||
---
|
||||
|
||||
@@ -10,10 +10,10 @@ This document completes the **64-bit SIMDID** bit layout as specified, with emph
|
||||
|
||||
```
|
||||
SIMDID (64 bits) [63 ........................................................ 0]
|
||||
+----------+-----------+----------------+----------------+----------------+----------------+----------------+
|
||||
| [63..56] | [47..40] | [39..32] | [31..16] | [15..8] | [7..4] | [3..0] |
|
||||
| uArchHi | AVX Feat | AMX Future | AVX512 Feature | MainLevel | Manuf | Root |
|
||||
+----------+-----------+----------------+----------------+----------------+----------------+----------------+
|
||||
+----------+-----------+-----------+----------------+----------------+----------------+--------+-------+
|
||||
| [63..56] | [55..48] | [47..40] | [39..32] | [31..16] | [15..8] | [7..4] | [3..0]|
|
||||
| uArchHi | AVX10Feat | AVX Feat | AMX Future | AVX512 Feature | MainLevel | Manuf | Root |
|
||||
+----------+-----------+-----------+----------------+----------------+----------------+--------+-------+
|
||||
```
|
||||
|
||||
- **[3..0] Root ISA**: Root ISA type (selects interpreter)
|
||||
@@ -22,6 +22,7 @@ SIMDID (64 bits) [63 ........................................................ 0
|
||||
- **[31..16] AVX512 Feature**: AVX-512 features/subsets/implementation form (key part)
|
||||
- **[39..32] AMX Future**: AMX features (few bits for now)
|
||||
- **[47..40] AVX Feature**: AVX-family capabilities (base requires AVX+AVX2; key extensions include FMA/F16C)
|
||||
- **[55..48] AVX10 Feature**: AVX10 converged ISA version and vector width support
|
||||
- **[63..56] uArchHi**: Optional microarchitecture/policy hints (default 0, no functional impact).
|
||||
|
||||
---
|
||||
@@ -36,12 +37,11 @@ Suggested encoding (minimal usable set, expandable if needed):
|
||||
| 1 | x86-64 |
|
||||
| 2 | AArch64 |
|
||||
| 3 | PPC64LE |
|
||||
| 4 | Apple Silicon (distinct value as required) |
|
||||
| 5 | RISC-V |
|
||||
| 6 | LoongArch |
|
||||
| 7..15 | Reserved |
|
||||
| 4 | RISC-V |
|
||||
| 5 | LoongArch |
|
||||
| 6..15 | Reserved |
|
||||
|
||||
> Note: Architecturally Apple Silicon is AArch64; a distinct value is provided here because the Root ISA layer may distinguish it. Interpreter choice is up to implementation.
|
||||
> Note: Apple Silicon is architecturally AArch64 and uses `Root ISA = 2`. Apple vs Qualcomm vs other AArch64 vendors are distinguished via the **Manufacture** nibble under the AArch64 interpreter, not via a separate Root ISA value.
|
||||
|
||||
---
|
||||
|
||||
@@ -57,7 +57,18 @@ For **x86-64**:
|
||||
| 3 | VIA/Zhaoxin |
|
||||
| 4..15 | Reserved |
|
||||
|
||||
For other Root ISAs, this nibble is defined by their interpreters (e.g., Apple/Qualcomm/MediaTek for ARM).
|
||||
For **AArch64**:
|
||||
|
||||
| Value | Manufacture |
|
||||
|---:|-------------|
|
||||
| 0 | Unknown/Other |
|
||||
| 1 | Apple |
|
||||
| 2 | Qualcomm |
|
||||
| 3 | MediaTek |
|
||||
| 4 | Ampere |
|
||||
| 5..15 | Reserved |
|
||||
|
||||
For other Root ISAs, this nibble is defined by their interpreters.
|
||||
|
||||
---
|
||||
|
||||
@@ -74,10 +85,10 @@ For other Root ISAs, this nibble is defined by their interpreters (e.g., Apple/Q
|
||||
| 4 | AVX2_FMA_F16C (from this level onward, 16-bit types are supported) |
|
||||
| 5 | AVX512 (check [31..16]) |
|
||||
| 6 | AMX |
|
||||
| 7 | AVX10 |
|
||||
| 7 | AVX10 (check [55..48]) |
|
||||
| 8..255 | Reserved |
|
||||
|
||||
> Scheduling suggestion: `MainLevel` is the primary switch; only when `MainLevel >= AVX512` should `AVX512 Feature` be parsed; only when `MainLevel >= AMX` should `AMX Future` be parsed. AVX Feature sits beside AMX/AVX512 and is meaningful when AVX or higher is present.
|
||||
> Scheduling suggestion: `MainLevel` is the primary switch; only when `MainLevel >= AVX512` should `AVX512 Feature` be parsed; only when `MainLevel >= AMX` should `AMX Future` be parsed; only when `MainLevel >= AVX10` should `AVX10 Feature` be parsed. AVX Feature sits beside AMX/AVX512 and is meaningful when AVX or higher is present.
|
||||
|
||||
---
|
||||
|
||||
@@ -109,7 +120,7 @@ Notes:
|
||||
| 2 | AVX512-NATIVE (full 512-bit ALU; 512-bit path is usable) |
|
||||
| 3 | Reserved |
|
||||
|
||||
- **VBMI/VBMI2/VNNI/BF16/FP16 ([29..26])**: Commonly needed niche or AI-related small-type extensions; set as needed.
|
||||
- **VBMI/VBMI2/VNNI/BF16/FP16 ([29..25])**: Commonly needed niche or AI-related small-type extensions; set as needed.
|
||||
- **R/AI (bit 24)**: Reserved for future AI or other non-crypto extensions.
|
||||
- **[31..30], [21], [19..16]**: Reserved for future allocation.
|
||||
|
||||
@@ -134,7 +145,39 @@ Rules:
|
||||
|
||||
---
|
||||
|
||||
## 8) "AVX512BASE" Determination (Single Check)
|
||||
## 8) AVX10 Feature Byte ([55..48], 8 bits)
|
||||
|
||||
Purpose: encode the converged AVX10 ISA version and supported vector widths. AVX10 unifies and replaces the fragmented AVX-512 subset model; a single version number implies a defined set of instructions (e.g., AVX10.1 implies F+CD+VL+DQ+BW+VBMI+VBMI2+VNNI+BF16+FP16 converged). The width bits indicate what maximum vector width the hardware actually implements.
|
||||
|
||||
**CPUID detection**: `CPUID leaf 0x24, subleaf 0`.
|
||||
- EBX[7:0] = AVX10 converged ISA version number (≥ 1 if supported).
|
||||
- EBX[16] = 128-bit vector support (always 1 when AVX10 is present).
|
||||
- EBX[17] = 256-bit vector support.
|
||||
- EBX[18] = 512-bit vector support.
|
||||
|
||||
AVX10 Feature (bits 55..48)
|
||||
|
||||
| bit | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 |
|
||||
|-----|----|----|----| ---- | ---- |----|----|------|
|
||||
| use | R | R | R | 512W | 256W | V2 | V1 | AVX10 |
|
||||
|
||||
Rules:
|
||||
- **AVX10 (bit 48)**: CPU declares AVX10 converged ISA support (leaf 0x24 reports a valid version ≥ 1).
|
||||
- **V1 (bit 49)**: AVX10 version ≥ 1 (AVX10.1). Set when `EBX[7:0] >= 1`.
|
||||
- **V2 (bit 50)**: AVX10 version ≥ 2 (AVX10.2). Set when `EBX[7:0] >= 2`.
|
||||
- **256W (bit 51)**: Hardware supports 256-bit vector width for AVX10 instructions (`EBX[17]` == 1).
|
||||
- **512W (bit 52)**: Hardware supports 512-bit vector width for AVX10 instructions (`EBX[18]` == 1).
|
||||
- **[53..55]**: Reserved for future AVX10 versions (V3, V4...) or additional width/feature bits.
|
||||
|
||||
> Note: When `AVX10 == 1`, the 128-bit width is always implied and does not need a dedicated bit. `V1` and `V2` are cumulative — if `V2` is set, `V1` must also be set.
|
||||
|
||||
**Relationship with AVX512 Feature**:
|
||||
- AVX10 is a superset specification. When `MainLevel == AVX10`, the `AVX512 Feature` field may still be populated for backward-compatible code paths (e.g., checking `AVX512_IMPL` to select DUAL vs NATIVE 512-bit policy).
|
||||
- AVX10/256 hardware does **not** support 512-bit operations; code should check `512W` before using zmm registers.
|
||||
|
||||
---
|
||||
|
||||
## 9) "AVX512BASE" Determination (Single Check)
|
||||
|
||||
- **Rule**: `BASE=1` implies `F+CD+VL+DQ+BW` are all present; no need for per-subset checks. Detection must keep this consistent; if not all subsets are present, set to 0.
|
||||
- **Runtime branching**:
|
||||
@@ -143,10 +186,11 @@ Rules:
|
||||
- Check `BASE`; if 0, fall back to AVX2/FMA (or treat as detection failure).
|
||||
- Check `AVX512_IMPL`: `DUAL` uses 256-bit/downclock-safe path, `NATIVE` uses 512-bit path.
|
||||
- When small-type/AI capabilities are required, consult `VNNI/BF16/FP16/VBMI/VBMI2` bits.
|
||||
- If `MainLevel == AVX10`: prefer AVX10 Feature for capability checks; `AVX512 Feature` remains valid for legacy branching.
|
||||
|
||||
---
|
||||
|
||||
## 9) AMX Future ([39..32], 8 bits)
|
||||
## 10) AMX Future ([39..32], 8 bits)
|
||||
|
||||
A single byte is reserved; define three common bits for now, leave the rest reserved:
|
||||
|
||||
@@ -161,7 +205,7 @@ When `MainLevel < AMX`, this byte can be all zeros.
|
||||
|
||||
---
|
||||
|
||||
## 10) uArchHi ([63..56], 8 bits)
|
||||
## 11) uArchHi ([63..56], 8 bits)
|
||||
|
||||
Purpose: optional high-byte strategy field to address issues like early Intel/AMD "glue" AVX512 that are not expressible purely via CPUID subsets. Defaults to 0.
|
||||
|
||||
@@ -177,7 +221,7 @@ Practical strategy for a single maintainer:
|
||||
|
||||
---
|
||||
|
||||
## 11) Minimal Detection-Side Fill Rules (x86-64)
|
||||
## 12) Minimal Detection-Side Fill Rules (x86-64)
|
||||
|
||||
1) Set `RootISA = x86-64`, `Manufacture = Intel/AMD`.
|
||||
2) Compute `MainLevel` (per ascending rule).
|
||||
@@ -189,10 +233,17 @@ Practical strategy for a single maintainer:
|
||||
- When VNNI/BF16/FP16/VBMI/VBMI2 are detected, set the corresponding bits.
|
||||
4) If `MainLevel >= AMX`: fill the AMX byte.
|
||||
5) When AVX/AVX2 are present, populate the AVX Feature byte: set AVX and AVX2; set FMA and F16C when detected; leave reserved bits for future extensions.
|
||||
6) Use uArchHi only when additional policy is needed; otherwise leave as 0.
|
||||
6) **AVX10 detection** (requires `CPUID leaf 7 subleaf 1, EDX[19] == 1` as the AVX10 convergence bit):
|
||||
- If AVX10 is indicated, query `CPUID leaf 0x24, subleaf 0`:
|
||||
- Read `EBX[7:0]` for version number; set `AVX10`, `V1`, and optionally `V2`.
|
||||
- Read `EBX[17]` for 256-bit support → set `256W`.
|
||||
- Read `EBX[18]` for 512-bit support → set `512W`.
|
||||
- Promote `MainLevel` to `AVX10` (value 7).
|
||||
- The `AVX512 Feature` field should still be filled for backward compatibility.
|
||||
7) Use uArchHi only when additional policy is needed; otherwise leave as 0.
|
||||
|
||||
---
|
||||
|
||||
## 12) Choice for High Bits Reservation
|
||||
## 13) Choice for High Bits Reservation
|
||||
|
||||
Currently `[31..24]` is reserved for AVX512 extensions/AI. `[47..44]` is reserved for AVX-family extensions beside the AVX byte. uArchHi `[63..56]` remains available for minimal policy hints. If IFMA or other extensions are more important, repurpose the reserved bits while keeping `BASE` and `Impl` unchanged.
|
||||
`[31..24]` is reserved for AVX512 extensions/AI. `[47..44]` is reserved for AVX-family extensions beside the AVX byte. `[55..53]` is reserved for future AVX10 versions. uArchHi `[63..56]` remains available for minimal policy hints. If IFMA or other extensions are more important, repurpose the reserved bits while keeping `BASE`, `Impl`, and `AVX10` core bits unchanged.
|
||||
Reference in New Issue
Block a user