feat(qemu): align Tile execution with PTO 0.58.6 - #80
Merged
Merged
Conversation
Rewrite linx_tile_sort to match the authoritative TSORT.asl ordering and publication model: sort_width from LB0 (0/omitted = 32, 1..64), stable per-row-group 64-pass adjacent swaps, numeric-before-NaN ordering in both directions, NaN source-order stability, signed-zero equality, and per-dtype NaN classification (FP16 0x7c00/0x0200, BF16 0x7f80/0x0040, FP32 0x7f800000/0x00400000). The U32 index output is the original zero-based column offset within its group (col MOD sort_width), and its physical rows derive from its own 4-byte element size and TSize capacity. Signaling-NaN observation ORs the sticky invalid status instead of faulting. Restrict the TSORT dtype gate to FP32/FP16/BF16.
- TDEQUANT: read the integer source type from tile_dtype (B.DATR carries the FP32 destination type), accept S8/U8/S32 integer sources via a variable source array, and free TSize from the destination descriptor. - TQUANT: implement affine FP32 -> S8/U8 quantization with optional B.IOR scale/zero-point (omission selects multiplier 1.0 and zero point 0). - TREMS/remainder: support FP16/BF16 remainder binary operations and relax the nonzero-divisor preflight for those dtypes. - Add E8M0 and low-precision numeric encode/decode to the f32<->dtype helpers (type 6..14), including ReferenceFloatToE8M0 rounding modes. - MSCATTER / MSCATTER_MASK: accept source-only TSize=000 and derive capacity/size_code from the source descriptor; use the active valid extent for bounds checks. - MGATHER.CAS: use the active valid extent for offset and expected/desired tile validation. - Bind operation sources through linx_tile_operation_source_count_accepted so variable-arity operations are permitted. - TINSERT double-source fix and TQUANT optional-IOR preflight. Refs: LinxISA/SuperScalarModel#132
Restore the Core-level aggregate Shared B.IOS payload semantics from the feat/tsort-v058-contracts branch on top of the PTO 0.58.3 master base. This keeps the legacy whole-payload path (issue #112/#132) while wiring the local/Shared TMOV preflight and commit paths to the new 0.58.3 registers and binding fields. The 0.58.3 per-PE Shared layout is replaced by the aggregate form: - local_to_shared writes the PE quarter into a Core-level payload. - shared_to_local reads the PE quarter (or the whole payload) back out. Validation: - ninja -C build-linx qemu-system-linx64 - python3 tests/linxisa/test_v0583_contract.py - python3 tests/linxisa/test_v058_pto_contract.py
The 0.58.3 master tests expected the per-PE Shared layout. On the branch we keep the aggregate Core-level payload (issue #112/#132), so update the contract assertions to require the legacy_whole path and the aggregate memcpy forms instead of the per-element region loop. Validation: - python3 tests/linxisa/test_v0583_contract.py - python3 tests/linxisa/test_v058_pto_contract.py
Regenerate the QEMU tile profile workbook from the SuperScalarModel status whose CUBE profiles are partitioned by ASL numeric class (Float->F32, Signed->S32, Unsigned->U32, plus MX no-scale/with-scale).
Regenerate the QEMU CUBE profile matrix after the SuperScalarModel cross-model status promoted the ordinary TMATMUL Local Float/Unsigned class profiles on gfrun. QEMU stays UNVERIFIED for those two classes because the current QEMU CUBE path cannot execute any v058 CUBE block.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PTO 0.58.6 reassigns TLSU functions 9–28, retires legacy direct Tile selectors, narrows Shared IDs to S0–S63, and requires exact ELF identity. This PR supersedes #66 and #79 with one QEMU line that decodes the 773-form LinxISA catalog, rejects retired aliases, executes the integer GM atom/reduction subset with full address preflight and atomic CAS, and implements the direct Local TIMG2COL M16/M32 path.
Unsupported accepted subprofiles fail closed: floating GM ADD, packed GM indices, nonzero GM atom destination padding, IOMMU-translated GM atomics, and cooperative Shared TIMG2COL. The QEMU support document records these boundaries.
Validation:
qemu-system-linx64build3d79447f635b00feb68f5a6acaa2dae31dc43b7a3e939897aeeabbd9ade9b1e559b8fa3396d55656