Skip to main content

PTO-ARCH-DATA-TYPES-FORMAT-HIF4-SCALE

PTO-ARCH-DATA-TYPES-FORMAT-HIF4-SCALE

ASL pseudocode

The complete ASL owner is shown directly below.

// PTO-UNIT: {"id":"PTO-ARCH-DATA-TYPES-FORMAT-HIF4-SCALE","surface":"arch","classification":["data-types","formats","hif4-scale"],"depends_on":["PTO-ARCH-DATA-TYPES-FP19"]}
// NDF-BEGIN: PTO-CUBE-HIF4-SCALE-001// ndf: kind=contract level=L1 layer=architecture status=accepted// A HiF4 Matrix scale MUST be one raw U32 word containing E6M2 in bits 7:0,// eight E1_8 exponents in bits 15:8, and sixteen E1_16 exponents in bits// 31:16. E6M2 values 00..FE MUST be finite with bias 48 and two fraction// bits; FF MUST be a legal quiet NaN scale. One word scales 64 logical HiF4// lanes through the selected E1_8 plus E1_16 exponent bits.// NDF-END: PTO-CUBE-HIF4-SCALE-001
pure func HiF4E6M2ValueClass(value: bits(8)) => NumericValueClassbegin    if value == Ones{8} then return NumericValue_QuietNaN; end;    return NumericValue_PositiveNormal;end;
pure func HiF4E6M2FiniteValue(value: bits(8)) => realbegin    assert value != Ones{8};    let exponent = (UInt(value[7:2]) - 48) as integer {-48..15};    let mantissa_quarters = 4 + UInt(value[1:0]);    return (Real(mantissa_quarters) / 4.0) * FP19PowerOfTwo(exponent);end;
pure func HiF4ScaleExponentIncrement(    scale_word: bits(32), q: integer {0..63}) => integer {0..2}begin    let e1_8_index = 8 + (q DIVRM 8);    let e1_16_index = 16 + (q DIVRM 4);    return UInt(scale_word[e1_8_index]) +           UInt(scale_word[e1_16_index]);end;
pure func HiF4ScaleFiniteValue(    scale_word: bits(32), q: integer {0..63}) => realbegin    assert HiF4E6M2ValueClass(scale_word[7:0]) ==        NumericValue_PositiveNormal;    return HiF4E6M2FiniteValue(scale_word[7:0]) *        FP19PowerOfTwo(HiF4ScaleExponentIncrement(scale_word, q));end;

Architecture behavior

purpose scope

Purpose and scope

A HiF4 Matrix scale is one 32-bit raw word used with 64 logical HiF4 lanes. This page explains how the base E6M2 field and two levels of exponent-selection bits combine; exact behavior remains in PTO-CUBE-HIF4-SCALE-001 and its ASL functions.

concepts state

Scale-word layout

Bits 7:0 hold one E6M2 base scale, bits 15:8 hold eight E1_8 exponent bits, and bits 31:16 hold sixteen E1_16 exponent bits.

For lane index q in 0..63, HiF4ScaleExponentIncrement selects bit 8 + (q DIVRM 8) and bit 16 + (q DIVRM 4), then adds the two selected bits to produce an increment from 0 through 2.

rules interactions

Base value and lane scale

E6M2 encodings 0x00 through 0xfe are finite positive values with bias 48 and two fraction bits. 0xff is a legal quiet NaN scale.

For a finite base, HiF4ScaleFiniteValue multiplies HiF4E6M2FiniteValue by FP19PowerOfTwo(increment), where increment is returned by HiF4ScaleExponentIncrement. The function requires the base field to classify as NumericValue_PositiveNormal.

boundaries

Boundaries

0x00 denotes 2^-48; 0xfe denotes 1.5 * 2^15; 0xff is not accepted by HiF4E6M2FiniteValue because it is the quiet NaN encoding.

Each E1_8 bit is shared by eight consecutive logical lanes, while each E1_16 bit is shared by four. The selected pair, not the other exponent bits in the word, affects a given q.

example usage

illustrative reading example

This example illustrates indexing and does not add a scale rule.

With base 0x00, E1_8 bit 8 set, and E1_16 bit 16 set, lane q = 0 gets increment 2 and scale 2^-46; lane q = 8 selects different exponent bits and gets increment 0 in the AVS fixture.

Related owners

  • FP19 provides FP19PowerOfTwo.
  • HiF4X2 defines the packed HiF4 logical-lane value format.

NDF clauses

Bodies come from owning ASL. Dragging or buttons change only this page-session view order.

    1. surfaceARCH
    2. ownerPTO-ARCH-DATA-TYPES-FORMAT-HIF4-SCALE
    3. categoryCUBE-HIF4-SCALE
    4. case001

    Normative contract

    contract · L1 · accepted

    A HiF4 Matrix scale MUST be one raw U32 word containing E6M2 in bits 7:0, eight E1_8 exponents in bits 15:8, and sixteen E1_16 exponents in bits 31:16. E6M2 values 00..FE MUST be finite with bias 48 and two fraction bits; FF MUST be a legal quiet NaN scale. One word scales 64 logical HiF4 lanes through the selected E1_8 plus E1_16 exponent bits.

    Sources and references
    Complete stable ID
    PTO-CUBE-HIF4-SCALE-001
    Source path
    asl/arch/data-types/formats/hif4-scale.asl
    Affected units
    PTO-ARCH-DATA-TYPES-FORMAT-HIF4-SCALE
    Source SHA-256
    6244309630f70598af01ec16b5ccc1e33b896b1db47b9fc315a79b454fe0255a
    Clause SHA-256
    d8219c1758a63297a987e21d60b6c3cdf066ae5b4606665f133c6e654fc4456b
    Open exact canonical source ↗

Evidence index

9 matching entries

Executable evidence3
  • PTO-ARCH-DATA-TYPES-FORMAT-HIF4-SCALE compiles as an independent normative unit
    1. surfaceARCH
    2. ownerPTO-ARCH-DATA-TYPES-FORMAT-HIF4-SCALE
    3. categorySTATIC-INVARIANT
    4. case001
    Show exact test source
    Sources and references
    Complete stable ID
    PTO-AVS-ARCH-DATA-TYPES-FORMAT-HIF4-SCALE-STATIC-001
    Path
    tests/asl/arch/data-types/formats/hif4-scale/arch-static-hif4-scale-contract-001.asl
    Kind / role
    static-invariant
    Requirements
    PTO-CUBE-HIF4-SCALE-001
    Pass condition
    the complete model and this unit's static invariant compile
    SHA-256
    46b5b244b12a06d0fc7c0387a000dc70045fc0728f59e7f38d0009c36246f76f
    Open exact source ↗ for PTO-AVS-ARCH-DATA-TYPES-FORMAT-HIF4-SCALE-STATIC-001
  • HiF4 E6M2 and exponent-bit scale boundaries are exact.
    1. surfaceARCH
    2. ownerPTO-ARCH-DATA-TYPES-FORMAT-HIF4-SCALE
    3. categoryBOUNDARY
    4. case001
    Show exact test source
    Sources and references
    Complete stable ID
    PTO-AVS-ARCH-HIF4-SCALE-001
    Path
    tests/asl/arch/data-types/formats/hif4-scale/arch-bound-hif4-scale-001.asl
    Kind / role
    boundary
    Requirements
    PTO-CUBE-HIF4-SCALE-001
    Pass condition
    00 is 2^-48, FE is 1.5*2^15, FF is legal quiet NaN, and q selects its exact E1_8 plus E1_16 increment.
    SHA-256
    1008e5fad222db2f31dda4d47b9a2825c69630bc28016b3a3ff0b6a92aa4432f
    Open exact source ↗ for PTO-AVS-ARCH-HIF4-SCALE-001
  • Decoded TMATMULMX accepts packed HiF4X2 sides with mandatory U32 group-64 scales.
    1. surfaceBLOCK
    2. ownerBSTART.TMATMULMX
    3. categoryEXECUTION
    4. case002
    Show exact test source
    Sources and references
    Complete stable ID
    PTO-AVS-BLOCK-TMATMULMX-HIF4-002
    Path
    tests/asl/block/execution/BSTART.TMATMULMX/block-exec-bstart-tmatmulmx-hif4-002.asl
    Kind / role
    execution
    Requirements
    PTO-CUBE-MATRIX-SCALE-001, PTO-CUBE-HIF4-SCALE-001
    Pass condition
    Two 1x1 packed HiF4X2 primaries and their Local CUBE_M32 U32 scale words execute through the Matrix-MX path and publish FP32 output.
    SHA-256
    91f5b9bff2f01f56f15768ed160eaef7f8e7b29073a15cb3c8cecd7de6211ba9
    Open exact source ↗ for PTO-AVS-BLOCK-TMATMULMX-HIF4-002
Commit-scoped evidence5
  • spec/evidence/release-traceability-readiness.json · closedPTO-EVIDENCE-RELEASE-TRACEABILITY
    Sources and references
    Complete stable ID
    PTO-EVIDENCE-RELEASE-TRACEABILITY
    Path
    spec/evidence/release-traceability-readiness.json
    Kind / role
    ASL/NDF/documentation/AVS traceability
    SHA-256
    c7327021d39dc67ac5564bc55073b3870a397d79ac8d9648284d56e33bc14a3e
    Open exact source ↗ for PTO-EVIDENCE-RELEASE-TRACEABILITY
  • spec/evidence/instruction-contract-closure.json · closedPTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSURE
    Sources and references
    Complete stable ID
    PTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSURE
    Path
    spec/evidence/instruction-contract-closure.json
    Kind / role
    mnemonic and encoding contract closure
    SHA-256
    3ef2bb62421c79dff8fa77a1c7983923b523244b8090812883ef81286ca8106a
    Open exact source ↗ for PTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSURE
  • spec/evidence/architecture-readiness.json · openPTO-EVIDENCE-ARCHITECTURE-READINESS
    Sources and references
    Complete stable ID
    PTO-EVIDENCE-ARCHITECTURE-READINESS
    Path
    spec/evidence/architecture-readiness.json
    Kind / role
    architecture maturity and blockers
    SHA-256
    4b0b85199101251bea744e0f3591cc31906909dc80d5ab651c417a936036a004
    Open exact source ↗ for PTO-EVIDENCE-ARCHITECTURE-READINESS
  • spec/evidence/release-gate-readiness.json · ready-for-exact-head-verificationPTO-EVIDENCE-RELEASE-GATE-READINESS
    Sources and references
    Complete stable ID
    PTO-EVIDENCE-RELEASE-GATE-READINESS
    Path
    spec/evidence/release-gate-readiness.json
    Kind / role
    exact-head gate readiness
    SHA-256
    a0f4d2b6920c08981ea55fd8ef820708a40d4feb5402c5150e8e9ab532d84ce0
    Open exact source ↗ for PTO-EVIDENCE-RELEASE-GATE-READINESS
  • spec/release-manifest.json · draftPTO-EVIDENCE-RELEASE-MANIFEST
    Sources and references
    Complete stable ID
    PTO-EVIDENCE-RELEASE-MANIFEST
    Path
    spec/release-manifest.json
    Kind / role
    release content and encoding fingerprints
    SHA-256
    1a64c109ed7a90351c41e2a418b3c0ebaf8ad975838986d2101385186b85c0d8
    Open exact source ↗ for PTO-EVIDENCE-RELEASE-MANIFEST
Decision history1
  • Matrix Scale Cell Layouts, HiF4 Scale Words, and CScale · accepted
    1. decision recordADR
    2. case0101

    Decision record

    Loading ADR-0101…

    Sources and references
    Complete stable ID
    ADR-0101
    Path
    docs/status/decisions/0101-matrix-scale-and-cscale.md
    Affected units
    PTO-ARCH-DATA-TYPES-FORMAT-HIF4-SCALE, PTO-ARCH-PROFILE-MATRIX-POSTPROCESS, PTO-BLOCK-B-FPATR, PTO-BLOCK-MODEL-DISPATCH-CUBE-TMATMUL, PTO-BLOCK-MODEL-DISPATCH-MATRIX-SCALE, PTO-BLOCK-MODEL-DISPATCH-SHARED-CUBE-MATRIX, PTO-BLOCK-MODEL-SCHEMA-ATTRIBUTES, PTO-BLOCK-MODEL-STATE-TYPES, PTO-TILE-MODEL-EXECUTION-CUBE, PTO-TILE-MODEL-EXECUTION-MATRIX-SCALE, PTO-TILE-MODEL-LEGALITY-MATRIX-FUNCTIONS, PTO-TILE-MODEL-LEGALITY-MATRIX-OPERANDS, PTO-TILE-MODEL-LEGALITY-MATRIX-POSTPROCESS, PTO-TILE-MODEL-LEGALITY-MATRIX-SHAPE, PTO-TILE-MODEL-SHAPE-CUBE-CELL
    Affected NDF
    PTO-B-FPATR-MATRIX-POSTPROCESS-001, PTO-CUBE-CSCALE-001, PTO-CUBE-HIF4-SCALE-001, PTO-CUBE-MATRIX-SCALE-001, PTO-CUBE-MATRIX-SCALE-CELL-001, PTO-CUBE-SHARED-TRANSPOSE-001
    SHA-256
    a5c962437636c0d3f4f3585d3b529fcc9821d4b00c540243c2351978196e9be0
    Open exact decision source ↗ for ADR-0101

Unit metadata

Open 4 generated metadata fields
id
PTO-ARCH-DATA-TYPES-FORMAT-HIF4-SCALE
surface
arch
classification
[
  "data-types",
  "formats",
  "hif4-scale"
]
depends_on
[
  "PTO-ARCH-DATA-TYPES-FP19"
]
Open generated traceability record
{
  "classification": [
    "data-types",
    "formats",
    "hif4-scale"
  ],
  "documentation": "docs/arch/data-types/formats/hif4-scale.md",
  "id": "PTO-ARCH-DATA-TYPES-FORMAT-HIF4-SCALE",
  "mnemonic": null,
  "readiness_subjects": [
    "ADR-0101"
  ],
  "semantic_tests": [
    "PTO-AVS-ARCH-HIF4-SCALE-001"
  ],
  "source": "asl/arch/data-types/formats/hif4-scale.asl",
  "surface": "arch",
  "tests": [
    "PTO-AVS-ARCH-DATA-TYPES-FORMAT-HIF4-SCALE-STATIC-001",
    "PTO-AVS-ARCH-HIF4-SCALE-001"
  ]
}

Sources and release identity

Show commit, paths, hashes, version, and canonical owners
Release
0.58.5 · Release candidate
Commit
7dc8b7e5b121d2b2499a2273bebff29e2cd86812
ASL SHA-256
6244309630f70598af01ec16b5ccc1e33b896b1db47b9fc315a79b454fe0255a
Generated documentation
docs/arch/data-types/formats/hif4-scale.md · embedded in this page
Documentation SHA-256
702603af420d1c9a3059a25e0c9bc823c18fed793a988382311ecc349778413c

Exact owners