PTO-TILE-MODEL-STATE-ALLOCATION
PTO-TILE-MODEL-STATE-ALLOCATIONASL pseudocode
The complete ASL owner is shown directly below.
// PTO-UNIT: {"id":"PTO-TILE-MODEL-STATE-ALLOCATION","surface":"tile","classification":["model","state","allocation"],"depends_on":["PTO-TILE-MODEL-SHAPE-VALID-REGION","PTO-TILE-MODEL-STATE-FEATURE-MAP-DESCRIPTORS"]}func ConfigureTileForMask(index: TileIndex, capacity_bytes: integer {0..262144}, rows: integer {0..65535}, columns: integer {0..65535}, valid_rows: integer {0..65535}, valid_columns: integer {0..65535}, data_type: TileDataType, layout: TileLayout, location: TileLocation, allocation_mask: bits(4))begin assert TileCapacityIsLegal(capacity_bytes); assert allocation_mask != Zeros{4}; assert rows > 0; assert valid_rows <= rows; assert TileDescriptorShapeLegal(capacity_bytes, columns, valid_rows, valid_columns, data_type); let derived_rows = DerivedTileRows(capacity_bytes, columns, data_type); assert rows <= derived_rows; assert derived_rows * columns <= TileLogicalElementCapacity(capacity_bytes, data_type); assert LocalTileAllocationFitsExcept( index, allocation_mask, capacity_bytes); InvalidateTileFeatureMapDescriptor(index); _TileAllocationMasks[[index]] = allocation_mask; _Tiles[[index]].allocated = TRUE; _Tiles[[index]].storage_kind = TileStorage_Numeric; // Allocation defines TileInfo but not the payload. A producer must write // the tile before any generic payload read is legal. _Tiles[[index]].contents_defined = FALSE; _Tiles[[index]].defined_elements = Zeros{PTO_MODEL_TILE_ELEMENTS}; _Tiles[[index]].defined_valid_elements = 0; _Tiles[[index]].packed_defined_elements = ZeroPackedTileDefinedElements(); _Tiles[[index]].capacity_bytes = capacity_bytes; _Tiles[[index]].rows = derived_rows; _Tiles[[index]].columns = columns; _Tiles[[index]].valid_rows = valid_rows; _Tiles[[index]].valid_columns = valid_columns; _Tiles[[index]].data_type = data_type; _Tiles[[index]].layout = layout; _Tiles[[index]].location = location; _Tiles[[index]].cube_k_repeat = 0; _Tiles[[index]].cube_n_repeat = 0; _Tiles[[index]].cube_cell_count = 0; _Tiles[[index]].cube_storage_bytes = 0;end;
pure func PredicateTileStorageBytes( rows: integer {0..65535}, columns: integer {0..65535}) => integerbegin return ((rows * columns) + 7) DIVRM 8;end;
func ConfigurePredicateTileForMask( index: TileIndex, capacity_bytes: integer {0..262144}, rows: integer {0..65535}, columns: integer {0..65535}, valid_rows: integer {0..65535}, valid_columns: integer {0..65535}, allocation_mask: bits(4))begin assert TileCapacityIsLegal(capacity_bytes); assert allocation_mask != Zeros{4}; assert rows > 0 && columns > 0; assert valid_rows <= rows && valid_columns <= columns; assert rows * columns <= PTO_MODEL_TILE_ELEMENTS; assert PredicateTileStorageBytes(rows, columns) <= capacity_bytes; assert LocalTileAllocationFitsExcept( index, allocation_mask, capacity_bytes); InvalidateTileFeatureMapDescriptor(index); _TileAllocationMasks[[index]] = allocation_mask; _Tiles[[index]].allocated = TRUE; _Tiles[[index]].storage_kind = TileStorage_Predicate; _Tiles[[index]].contents_defined = FALSE; _Tiles[[index]].defined_elements = Zeros{PTO_MODEL_TILE_ELEMENTS}; _Tiles[[index]].defined_valid_elements = 0; _Tiles[[index]].packed_defined_elements = ZeroPackedTileDefinedElements(); _Tiles[[index]].capacity_bytes = capacity_bytes; _Tiles[[index]].rows = rows; _Tiles[[index]].columns = columns; _Tiles[[index]].valid_rows = valid_rows; _Tiles[[index]].valid_columns = valid_columns; _Tiles[[index]].data_type = TileDataType_U8; _Tiles[[index]].layout = TileLayout_RowMajor; _Tiles[[index]].location = TileLocation_Any; _Tiles[[index]].cube_k_repeat = 0; _Tiles[[index]].cube_n_repeat = 0; _Tiles[[index]].cube_cell_count = 0; _Tiles[[index]].cube_storage_bytes = 0;end;
func ConfigurePredicateTile( index: TileIndex, capacity_bytes: integer {0..262144}, rows: integer {0..65535}, columns: integer {0..65535}, valid_rows: integer {0..65535}, valid_columns: integer {0..65535})begin ConfigurePredicateTileForMask( index, capacity_bytes, rows, columns, valid_rows, valid_columns, '0001');end;
func ConfigureTile(index: TileIndex, capacity_bytes: integer {0..262144}, rows: integer {0..65535}, columns: integer {0..65535}, valid_rows: integer {0..65535}, valid_columns: integer {0..65535}, data_type: TileDataType, layout: TileLayout, location: TileLocation)begin // Direct one-level operations model the already-resolved current-PE // fragment and therefore charge one PE of capacity. ConfigureTileForMask(index, capacity_bytes, rows, columns, valid_rows, valid_columns, data_type, layout, location, '0001');end;
func ConfigureCubeTileForMask( index: TileIndex, capacity_bytes: integer {0..262144}, valid_rows: integer {0..65535}, valid_columns: integer {0..65535}, data_type: TileDataType, layout: TileLayout, location: TileLocation, allocation_mask: bits(4)) => booleanbegin if allocation_mask == Zeros{4} || location != TileLocation_Matrix || !TileCubeDescriptorShapeLegal(capacity_bytes, valid_rows, valid_columns, data_type, layout) then return FALSE; end; if !LocalTileAllocationFitsExcept( index, allocation_mask, capacity_bytes) then return FALSE; end; let rows = TileCubeStorageRows(layout, valid_rows, data_type); let columns = TileCubeStorageColumns(layout, valid_columns, data_type); let k_repeat = TileCubeKRepeat( layout, valid_rows, valid_columns, data_type); let n_repeat = TileCubeNRepeat( layout, valid_rows, valid_columns, data_type); let cell_count = TileCubeCellCount( layout, valid_rows, valid_columns, data_type); let storage_bytes = TileCubeRequiredBytes( layout, valid_rows, valid_columns, data_type); assert rows != 0 && columns != 0 && k_repeat != 0 && n_repeat != 0 && cell_count != 0 && storage_bytes != 0; InvalidateTileFeatureMapDescriptor(index); _TileAllocationMasks[[index]] = allocation_mask; _Tiles[[index]].allocated = TRUE; _Tiles[[index]].storage_kind = TileStorage_Numeric; _Tiles[[index]].contents_defined = FALSE; _Tiles[[index]].defined_elements = Zeros{PTO_MODEL_TILE_ELEMENTS}; _Tiles[[index]].defined_valid_elements = 0; _Tiles[[index]].capacity_bytes = capacity_bytes; _Tiles[[index]].rows = rows; _Tiles[[index]].columns = columns; _Tiles[[index]].valid_rows = valid_rows; _Tiles[[index]].valid_columns = valid_columns; _Tiles[[index]].data_type = data_type; _Tiles[[index]].layout = layout; _Tiles[[index]].location = location; _Tiles[[index]].cube_k_repeat = k_repeat; _Tiles[[index]].cube_n_repeat = n_repeat; _Tiles[[index]].cube_cell_count = cell_count; _Tiles[[index]].cube_storage_bytes = storage_bytes; return TRUE;end;
func ConfigureCubeTile( index: TileIndex, capacity_bytes: integer {0..262144}, valid_rows: integer {0..65535}, valid_columns: integer {0..65535}, data_type: TileDataType, layout: TileLayout, location: TileLocation) => booleanbegin return ConfigureCubeTileForMask(index, capacity_bytes, valid_rows, valid_columns, data_type, layout, location, '0001');end;
func ReleaseTile(index: TileIndex)begin InvalidateTileFeatureMapDescriptor(index); _TileAllocationMasks[[index]] = Zeros{4}; _Tiles[[index]].allocated = FALSE; _Tiles[[index]].storage_kind = TileStorage_Numeric; _Tiles[[index]].contents_defined = FALSE; _Tiles[[index]].defined_elements = Zeros{PTO_MODEL_TILE_ELEMENTS}; _Tiles[[index]].defined_valid_elements = 0; _Tiles[[index]].packed_defined_elements = ZeroPackedTileDefinedElements(); _Tiles[[index]].capacity_bytes = 0; _Tiles[[index]].rows = 0; _Tiles[[index]].columns = 0; _Tiles[[index]].valid_rows = 0; _Tiles[[index]].valid_columns = 0; _Tiles[[index]].data_type = TileDataType_U8; _Tiles[[index]].layout = TileLayout_RowMajor; _Tiles[[index]].location = TileLocation_Any; _Tiles[[index]].cube_k_repeat = 0; _Tiles[[index]].cube_n_repeat = 0; _Tiles[[index]].cube_cell_count = 0; _Tiles[[index]].cube_storage_bytes = 0;end;
Architecture behavior
This internal model unit is documented through its normative ASL/NDF owners and validation evidence; it has no reader-guide migration target.
NDF clauses
Bodies come from owning ASL. Dragging or buttons change only this page-session view order.
No NDF clause is attached to this unit.
Evidence index
11 matching entries
Executable evidence4
CUBE allocation publishes persistent aligned descriptor geometry without defining payload
- surfaceTILE
- ownerPTO-TILE-MODEL-STATE-ALLOCATION
- categorySTATE-TRANSITION
- case001
Show exact test source
Sources and references
- Complete stable ID
PTO-AVS-TILE-CUBE-ALLOCATE-001- Path
tests/asl/tile/model/state/allocation/tile-state-cube-allocate-001.asl- Kind / role
- state-transition
- Requirements
- PTO-CUBE-CELL-STATE-001
- Pass condition
- a 13 by 19 FP16 N8 Tile records 16 by 24 storage six CELLs and zero defined valid elements
- SHA-256
98b1a87c3736c35aec627bd9249037ac3ebdd39f43949bd6ece2634e71c95f28
Persistent CUBE layouts are legal only in Local Matrix storage
- surfaceTILE
- ownerPTO-TILE-MODEL-STATE-ALLOCATION
- categoryFAULT
- case003
Show exact test source
Sources and references
- Complete stable ID
PTO-AVS-TILE-CUBE-LOCATION-003- Path
tests/asl/tile/model/state/allocation/tile-fault-cube-location-003.asl- Kind / role
- fault
- Requirements
- PTO-CUBE-CELL-STATE-001
- Pass condition
- Vector configuration rejects without allocation and a location-mutated descriptor fails CUBE legality
- SHA-256
06248ca5f81661c842628ada347c465a4b869d849dbfffbfbd8a49cab84a0220
Rejected CUBE reconfiguration preserves the complete existing Tile and capacity accounting
- surfaceTILE
- ownerPTO-TILE-MODEL-STATE-ALLOCATION
- categoryFAULT
- case002
Show exact test source
Sources and references
- Complete stable ID
PTO-AVS-TILE-CUBE-RECONFIGURE-002- Path
tests/asl/tile/model/state/allocation/tile-fault-cube-reconfigure-002.asl- Kind / role
- fault
- Requirements
- PTO-CUBE-CELL-STATE-001
- Pass condition
- an undersized N8 replacement returns false without changing descriptor payload definedness mask or capacity
- SHA-256
999f9b2a27e09baa81fb27ec6934947e9987f32880125c88d818fa06fb07d5ac
PTO-TILE-MODEL-STATE-ALLOCATION compiles as an independent normative unit
- surfaceTILE
- ownerPTO-TILE-MODEL-STATE-ALLOCATION
- categorySTATIC-INVARIANT
- case001
Show exact test source
Sources and references
- Complete stable ID
PTO-AVS-TILE-MODEL-STATE-ALLOCATION-STATIC-001- Path
tests/asl/tile/model/state/allocation/tile-static-allocation-contract-001.asl- Kind / role
- static-invariant
- Pass condition
- the complete model and this unit's static invariant compile
- SHA-256
237cdbc4a7da29afbe3ab57e7911c10f8a08f281941ae2fbcf262149e01afec7
Commit-scoped evidence5
spec/evidence/release-traceability-readiness.json · closed
PTO-EVIDENCE-RELEASE-TRACEABILITYSources 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
spec/evidence/instruction-contract-closure.json · closed
PTO-EVIDENCE-INSTRUCTION-CONTRACT-CLOSURESources 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
spec/evidence/architecture-readiness.json · open
PTO-EVIDENCE-ARCHITECTURE-READINESSSources and references
- Complete stable ID
PTO-EVIDENCE-ARCHITECTURE-READINESS- Path
spec/evidence/architecture-readiness.json- Kind / role
- architecture maturity and blockers
- SHA-256
4b0b85199101251bea744e0f3591cc31906909dc80d5ab651c417a936036a004
spec/evidence/release-gate-readiness.json · ready-for-exact-head-verification
PTO-EVIDENCE-RELEASE-GATE-READINESSSources 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
spec/release-manifest.json · draft
PTO-EVIDENCE-RELEASE-MANIFESTSources and references
- Complete stable ID
PTO-EVIDENCE-RELEASE-MANIFEST- Path
spec/release-manifest.json- Kind / role
- release content and encoding fingerprints
- SHA-256
1a64c109ed7a90351c41e2a418b3c0ebaf8ad975838986d2101385186b85c0d8
Decision history2
Re-encode B.IOT and B.IOS size and PE mode fields · accepted
- decision recordADR
- case0096
Decision record
Loading ADR-0096…
Sources and references
- Complete stable ID
ADR-0096- Path
docs/status/decisions/0096-b-iot-b-ios-sizecode-pemode.md- Affected units
- PTO-ARCH-DATA-TYPES-INTEGER, PTO-ARCH-FEATURES-TILE-ALLOCATION, PTO-ARCH-MEMORY-MODEL-GLOBAL-MEMORY-ACCESS, PTO-ARCH-PROFILE-RESET, PTO-ARCH-PROGRAMMING-MODEL-CORE-PE-TOPOLOGY, PTO-BLOCK-B-IOS, PTO-BLOCK-B-IOT, PTO-BLOCK-MODEL-DISPATCH-COMMANDS, PTO-BLOCK-MODEL-DISPATCH-CUBE-TMATMUL, PTO-BLOCK-MODEL-DISPATCH-DESTINATION-SHAPE, PTO-BLOCK-MODEL-DISPATCH-SHARED-CUBE-MATRIX, PTO-BLOCK-MODEL-DISPATCH-SHARED-TLSU, PTO-BLOCK-MODEL-OPERANDS-SHARED-BINDINGS, PTO-BLOCK-MODEL-OPERANDS-TILE-BINDINGS, PTO-BLOCK-MODEL-SCHEMA-PROFILE-ENCODING, PTO-BLOCK-MODEL-STATE-TYPES, PTO-TILE-MODEL-DEFINEDNESS-ELEMENTS, PTO-TILE-MODEL-DEFINEDNESS-PACKED-BOUNDARY, PTO-TILE-MODEL-EXECUTION-COMPARISON, PTO-TILE-MODEL-EXECUTION-COMPLEX, PTO-TILE-MODEL-EXECUTION-CUBE, PTO-TILE-MODEL-EXECUTION-ELEMENTWISE, PTO-TILE-MODEL-EXECUTION-EXPANSION, PTO-TILE-MODEL-EXECUTION-FUSED-MULTIPLY-ADD, PTO-TILE-MODEL-EXECUTION-GENERATION, PTO-TILE-MODEL-EXECUTION-IMAGE-TO-COLUMN, PTO-TILE-MODEL-EXECUTION-INDEXED-REARRANGEMENT, PTO-TILE-MODEL-EXECUTION-REARRANGEMENT, PTO-TILE-MODEL-EXECUTION-REDUCTION, PTO-TILE-MODEL-EXECUTION-SORTING, PTO-TILE-MODEL-EXECUTION-UNARY, PTO-TILE-MODEL-LEGALITY-ALLOCATION-CAPACITY, PTO-TILE-MODEL-LEGALITY-DESCRIPTOR-SHAPE, PTO-TILE-MODEL-LEGALITY-IMAGE-TO-COLUMN, PTO-TILE-MODEL-LEGALITY-INDEXED-REARRANGEMENT, PTO-TILE-MODEL-LEGALITY-MATRIX-INFO-DESCRIPTOR, PTO-TILE-MODEL-LEGALITY-MATRIX-POSTPROCESS, PTO-TILE-MODEL-LEGALITY-PE-MASK, PTO-TILE-MODEL-MEMORY-LOAD-STORE, PTO-TILE-MODEL-MEMORY-SHARED-MOVEMENT, PTO-TILE-MODEL-NUMERIC-FORMATS, PTO-TILE-MODEL-ORDERING-SORTING, PTO-TILE-MODEL-SHAPE-VALID-REGION, PTO-TILE-MODEL-STATE-ALLOCATION, PTO-TILE-MODEL-STATE-DESCRIPTORS, PTO-TILE-MODEL-STATE-FEATURE-MAP-DESCRIPTORS, PTO-TILE-MODEL-STATE-SHARED-REGISTERS, PTO-TILE-MODEL-STATE-TYPES, PTO-TILE-TLOAD
- Affected NDF
- PTO-ARCH-GM-ACCESS-001, PTO-B-IOS-SHARED-STATE-001, PTO-B-IOT-STREAM-001, PTO-CUBE-ACCUMULATOR-OUTPUT-001, PTO-TLOAD-CUBE-001, PTO-TLOAD-MEMORY-001
- SHA-256
c4b4fb7bc17878f710015207dc19ddaf22a0cf6989d185b16844714c71e23f62
Local and Shared capacity pools with cooperative M-sharding · accepted
- decision recordADR
- case0097
Decision record
Loading ADR-0097…
Sources and references
- Complete stable ID
ADR-0097- Path
docs/status/decisions/0097-local-shared-capacity-and-cooperative-m-sharding.md- Affected units
- PTO-ARCH-DATA-TYPES-INTEGER, PTO-ARCH-FEATURES-TILE-ALLOCATION, PTO-ARCH-OVERVIEW-ARCHITECTURE, PTO-ARCH-PROGRAMMING-MODEL-CORE-PE-TOPOLOGY, PTO-BLOCK-B-IOS, PTO-BLOCK-B-IOT, PTO-BLOCK-MODEL-DISPATCH-COMMANDS, PTO-BLOCK-MODEL-DISPATCH-CUBE-DESTINATION, PTO-BLOCK-MODEL-DISPATCH-CUBE-TMATMUL, PTO-BLOCK-MODEL-DISPATCH-DESTINATION-SHAPE, PTO-BLOCK-MODEL-DISPATCH-SHARED-CUBE-MATRIX, PTO-BLOCK-MODEL-OPERANDS-SHARED-BINDINGS, PTO-BLOCK-MODEL-STATE-TYPES, PTO-TILE-MODEL-CAPACITY-LOCAL, PTO-TILE-MODEL-CAPACITY-SHARED, PTO-TILE-MODEL-MEMORY-SHARED-MOVEMENT, PTO-TILE-MODEL-STATE-ALLOCATION, PTO-TILE-MODEL-STATE-DESCRIPTORS, PTO-TILE-MODEL-STATE-SHARED-REGISTERS, PTO-TILE-MODEL-STATE-TYPES
- Affected NDF
- PTO-B-IOS-SHARED-STATE-001, PTO-B-IOT-STREAM-001, PTO-CUBE-GROUP-M-DISTRIBUTION-001, PTO-TILE-CAPACITY-PER-PE
- SHA-256
7de93019f9272a73d5f42e42bec242725edadbcf41ed34a3155d40fb37f0cd14
Unit metadata
Open 4 generated metadata fields
Open generated traceability record
{
"classification": [
"model",
"state",
"allocation"
],
"documentation": "docs/tile/model/state/allocation.md",
"id": "PTO-TILE-MODEL-STATE-ALLOCATION",
"mnemonic": null,
"readiness_subjects": [
"ADR-0096",
"ADR-0097"
],
"semantic_tests": [
"PTO-AVS-TILE-CUBE-ALLOCATE-001",
"PTO-AVS-TILE-CUBE-LOCATION-003",
"PTO-AVS-TILE-CUBE-RECONFIGURE-002"
],
"source": "asl/tile/model/state/allocation.asl",
"surface": "tile",
"tests": [
"PTO-AVS-TILE-CUBE-ALLOCATE-001",
"PTO-AVS-TILE-CUBE-LOCATION-003",
"PTO-AVS-TILE-CUBE-RECONFIGURE-002",
"PTO-AVS-TILE-MODEL-STATE-ALLOCATION-STATIC-001"
]
}Sources and release identity
Show commit, paths, hashes, version, and canonical owners
- Release
0.58.5· Release candidate- Commit
7dc8b7e5b121d2b2499a2273bebff29e2cd86812- Original ASL
- asl/tile/model/state/allocation.asl
- ASL SHA-256
bb35c4add7234eaa16cb749cff0d6989501416da2d2e0438e7cd00ade14e5fe5- Generated documentation
- docs/tile/model/state/allocation.md · embedded in this page
- Documentation SHA-256
90b32619ac0047734b3a1fa2c9f97ba6ec32f394c209e2daf817a41d49447293
Exact owners
- ASL PTO-TILE-MODEL-STATE-ALLOCATION
asl/tile/model/state/allocation.asl