PTO-TILE-MODEL-EXECUTION-POSTPROCESS
PTO-TILE-MODEL-EXECUTION-POSTPROCESSASL pseudocode
The complete ASL owner is shown directly below.
// PTO-UNIT: {"id":"PTO-TILE-MODEL-EXECUTION-POSTPROCESS","surface":"tile","classification":["model","execution","postprocess"],"depends_on":["PTO-TILE-MODEL-EXECUTION-CUBE","PTO-TILE-MODEL-LEGALITY-MATRIX-POSTPROCESS"]}// Complete-bundle B.FPATR post-processing. Numeric conversion and activation// remain behind the named profile hooks while this unit owns operand routing,// reductions, and atomic auxiliary-output publication.
impdef func TileProfileMatrixPostProcess( value: Word, pre_quant_mode: bits(6), relu_mode: bits(3), group_n_code: bits(4), output_type: TileDataType, quant_param: Word, relu_param: Word, control: NumericExecutionControl) => Wordbegin return value;end;
impdef func TileProfileMatrixPostProcessWithFlags( value: Word, pre_quant_mode: bits(6), relu_mode: bits(3), group_n_code: bits(4), output_type: TileDataType, quant_param: Word, relu_param: Word, control: NumericExecutionControl) => (Word, bits(5))begin return (value, Zeros{5});end;
impdef func TileProfileMatrixReductionStep( current: Word, candidate: Word, max_abs: boolean, data_type: TileDataType) => Wordbegin return candidate;end;
impdef func TileProfileMatrixReductionStepWithFlags( current: Word, candidate: Word, max_abs: boolean, data_type: TileDataType) => (Word, bits(5))begin return (candidate, Zeros{5});end;
readonly func BundleMatrixLocalMathematicalSourceCount() => integer {0..6}begin let function = UInt(_BundleOperation.selector[4:0]); let left_type = TileDataTypeFromEncoding( CurrentBundleTileOperationDataTypeCode() as TileDataTypeEncoding); let right_type = if _BundleDataAttributesPresent then TileDataTypeFromEncoding( _BundleDataAttributes.data_type as TileDataTypeEncoding) else left_type; let base = TileMatrixLocalMathematicalSourceCount( function, left_type, right_type, BundleSharedBindingCount()); return (base + (if _BundleFixedPointAttributes.c_scale_en then 1 else 0)) as integer {0..6};end;
readonly func BundleMatrixOperationIndex() => integer {0..PTO_TILE_OPERATION_COUNT-1}begin let decoded = DecodeTileOperation(TileDecode_CUBE, BundleOperationDecodeCode(_BundleOperation)); assert decoded != PTO_TILE_OPERATION_COUNT; return decoded as integer {0..PTO_TILE_OPERATION_COUNT-1};end;
func MatrixRowMaxResult(input: TileInfo, destination: TileIndex, rowmax_input: TileIndex, has_input: boolean, intermediate_type: TileDataType) => (TileInfo, bits(5))begin var output = _Tiles[[destination]]; var payload = output.payload; var flags = Zeros{5}; for row = 0 to input.valid_rows - 1 looplimit 65536 do let first = TileStorageIndex(input, row as integer {0..65535}, 0); var value = input.payload[[first]]; if _BundleFixedPointAttributes.max_abs_en then let (initial, initial_flags) = TileProfileMatrixReductionStepWithFlags( value, value, TRUE, intermediate_type); value = initial; flags = flags OR initial_flags; end; for column = 1 to input.valid_columns - 1 looplimit 65536 do let element = TileStorageIndex(input, row as integer {0..65535}, column as integer {0..65535}); let (next, step_flags) = TileProfileMatrixReductionStepWithFlags( value, input.payload[[element]], _BundleFixedPointAttributes.max_abs_en, intermediate_type); value = next; flags = flags OR step_flags; end; if has_input then let input_element = TileStorageIndex(_Tiles[[rowmax_input]], row as integer {0..65535}, 0); let (next, step_flags) = TileProfileMatrixReductionStepWithFlags( _Tiles[[rowmax_input]].payload[[input_element]], value, _BundleFixedPointAttributes.max_abs_en, intermediate_type); value = next; flags = flags OR step_flags; end; let output_element = TileStorageIndex(output, row as integer {0..65535}, 0); payload[[output_element]] = value; end; output.payload = payload; return (MarkLocalTileValidRegionDefined(output), flags);end;
func MatrixGroupMaxResult(input: TileInfo, destination: TileIndex, intermediate_type: TileDataType) => (TileInfo, bits(5))begin var output = _Tiles[[destination]]; var payload = output.payload; var flags = Zeros{5}; let group_n = BundleFPATRGroupN(_BundleFixedPointAttributes.group_n_code); for row = 0 to input.valid_rows - 1 looplimit 65536 do for group = 0 to output.valid_columns - 1 looplimit 65536 do let first_column = group * group_n; let first = TileStorageIndex(input, row as integer {0..65535}, first_column as integer {0..65535}); var value = input.payload[[first]]; if _BundleFixedPointAttributes.max_abs_en then let (initial, initial_flags) = TileProfileMatrixReductionStepWithFlags( value, value, TRUE, intermediate_type); value = initial; flags = flags OR initial_flags; end; for offset = 1 to group_n - 1 looplimit 128 do let column = first_column + offset; if column < input.valid_columns then let element = TileStorageIndex(input, row as integer {0..65535}, column as integer {0..65535}); let (next, step_flags) = TileProfileMatrixReductionStepWithFlags( value, input.payload[[element]], _BundleFixedPointAttributes.max_abs_en, intermediate_type); value = next; flags = flags OR step_flags; end; end; let output_element = TileStorageIndex(output, row as integer {0..65535}, group as integer {0..65535}); payload[[output_element]] = value; end; end; output.payload = payload; return (MarkLocalTileValidRegionDefined(output), flags);end;
func MatrixPostProcessResult(input: TileInfo, intermediate_type: TileDataType) => (TileInfo, bits(5))begin if !_BundleFixedPointAttributes.valid then return (input, Zeros{5}); end; var result = input; var payload = input.payload; var flags = Zeros{5}; let output_type = if UInt( _BundleFixedPointAttributes.pre_quant_mode) == 0 then intermediate_type else BundleFPATROutputType(_BundleFixedPointAttributes.pre_quant_mode); let operation = BundleMatrixOperationIndex(); let operands = BundleTileInstructionOperands(operation); let numeric_control = ResolveTileNumericExecutionControl(operation, operands); let mathematical_sources = BundleMatrixLocalMathematicalSourceCount(); let quant_source_ordinal = mathematical_sources + (if _BundleFixedPointAttributes.row_max_en && _BundleFixedPointAttributes.row_max_init then 1 else 0); let relu_source_ordinal = quant_source_ordinal + (if BundleFPATRModeUsesVectorParameter( _BundleFixedPointAttributes.pre_quant_mode) then 1 else 0); let quant_tile = BundleMatrixSourceAt(quant_source_ordinal as integer {0..8}); let relu_tile = BundleMatrixSourceAt(relu_source_ordinal as integer {0..8}); for row = 0 to input.valid_rows - 1 looplimit 65536 do for column = 0 to input.valid_columns - 1 looplimit 65536 do let element = TileStorageIndex(input, row as integer {0..65535}, column as integer {0..65535}); let quant_param = if BundleFPATRModeUsesVectorParameter( _BundleFixedPointAttributes.pre_quant_mode) then _Tiles[[quant_tile]].payload[[TileStorageIndex( _Tiles[[quant_tile]], 0, column as integer {0..65535})]] else if BundleFPATRModeUsesScalarParameter( _BundleFixedPointAttributes.pre_quant_mode) then operands.post_quant_param else Zeros{PTO_XLEN} + 1; let relu_param = if BundleFPATRReluModeUsesVectorParameter( _BundleFixedPointAttributes.relu_mode) then _Tiles[[relu_tile]].payload[[TileStorageIndex( _Tiles[[relu_tile]], 0, column as integer {0..65535})]] else operands.post_lrelu_param; let (processed, element_flags) = TileProfileMatrixPostProcessWithFlags( payload[[element]], _BundleFixedPointAttributes.pre_quant_mode, _BundleFixedPointAttributes.relu_mode, _BundleFixedPointAttributes.group_n_code, output_type, quant_param, relu_param, numeric_control); payload[[element]] = processed; flags = flags OR element_flags; end; end; result.data_type = output_type; result.payload = payload; return (result, flags);end;
func CommitMatrixResult(destination: TileIndex, result: TileInfo, intermediate_type: TileDataType)begin let mathematical_sources = BundleMatrixLocalMathematicalSourceCount(); let rowmax_input = BundleMatrixSourceAt( mathematical_sources as integer {0..8}); let (processed, process_flags) = MatrixPostProcessResult( result, intermediate_type); let rowmax_destination = BundleMatrixDestinationAt(1); let group_destination = if _BundleFixedPointAttributes.row_max_en then BundleMatrixDestinationAt(2) else BundleMatrixDestinationAt(1); let (row_result, row_flags) = if _BundleFixedPointAttributes.row_max_en then MatrixRowMaxResult( result, rowmax_destination, rowmax_input, _BundleFixedPointAttributes.row_max_init, intermediate_type) else (_Tiles[[0]], Zeros{5}); let (group_result, group_flags) = if _BundleFixedPointAttributes.group_max_en then MatrixGroupMaxResult(result, group_destination, intermediate_type) else (_Tiles[[0]], Zeros{5}); // Prepare every output from pre-commit state, then publish as one group. _Tiles[[destination]] = processed; if _BundleFixedPointAttributes.row_max_en then _Tiles[[rowmax_destination]] = row_result; end; if _BundleFixedPointAttributes.group_max_en then _Tiles[[group_destination]] = group_result; end; RecordNumericStatusFlags(process_flags OR row_flags OR group_flags);end;
func CommitMatrixResult(destination: TileIndex, result: TileInfo)begin CommitMatrixResult(destination, result, result.data_type);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
10 matching entries
Executable evidence5
matrix postprocess computes raw D RowMaxOut and partial GroupMaxOut before one publication
- surfaceTILE
- ownerPTO-TILE-MODEL-EXECUTION-POSTPROCESS
- categoryEXECUTION
- case001
Show exact test source
Sources and references
- Complete stable ID
PTO-AVS-TILE-MODEL-EXECUTION-POSTPROCESS-AUX-EXECUTION-001- Path
tests/asl/tile/model/execution/postprocess/tile-exec-postprocess-aux-001.asl- Kind / role
- execution
- Requirements
- PTO-MATRIX-POSTPROCESS-BITEXACT-001
- Pass condition
- legal U32 outputs observe raw values RowMaxIn and exact full plus partial groups
- SHA-256
6ef6b64a850a6909c5a28c2eab0b4155dd555044ee0fc0d066441c64a5c3170a
PTO-TILE-MODEL-EXECUTION-POSTPROCESS compiles as an independent normative unit
- surfaceTILE
- ownerPTO-TILE-MODEL-EXECUTION-POSTPROCESS
- categorySTATIC-INVARIANT
- case001
Show exact test source
Sources and references
- Complete stable ID
PTO-AVS-TILE-MODEL-EXECUTION-POSTPROCESS-STATIC-001- Path
tests/asl/tile/model/execution/postprocess/tile-static-postprocess-contract-001.asl- Kind / role
- static-invariant
- Pass condition
- the complete model and this unit's static invariant compile
- SHA-256
ec371dee401c5c5390f3453c33e7b1482fc758cdc2be40ee7b126cdbacf7e82f
single-element RowMax and GroupMax apply MaxAbs before publication
- surfaceTILE
- ownerPTO-TILE-MODEL-EXECUTION-POSTPROCESS
- categoryEXECUTION
- case002
Show exact test source
Sources and references
- Complete stable ID
PTO-AVS-TILE-POST-MAXABS-SINGLE-002- Path
tests/asl/tile/model/execution/postprocess/tile-exec-postprocess-maxabs-single-002.asl- Kind / role
- execution
- Requirements
- PTO-MATRIX-POSTPROCESS-BITEXACT-001
- Pass condition
- a negative one-element S32 accumulator publishes its positive magnitude to both auxiliary outputs
- SHA-256
d986c36499a47c94a87f10e4854cc11a611fb33e4aa9f8f07baf619ea52f5bb0
matrix GroupMax executes one partial group when GroupN exceeds N
- surfaceTILE
- ownerPTO-TILE-MODEL-EXECUTION-POSTPROCESS
- categoryEXECUTION
- case004
Show exact test source
Sources and references
- Complete stable ID
PTO-AVS-TILE-POSTPROCESS-GROUP-LARGE-004- Path
tests/asl/tile/model/execution/postprocess/tile-exec-postprocess-group-large-004.asl- Kind / role
- execution
- Requirements
- PTO-MATRIX-POSTPROCESS-BITEXACT-001
- Pass condition
- a one by three U32 accumulator with GroupN eight publishes one maximum value
- SHA-256
d85357a8178860f0d81961453d6ba041aa3d9a81e7989d3bf5ab297c871ac511
matrix postprocess rejects a late GroupMax capacity failure before any publication
- surfaceTILE
- ownerPTO-TILE-MODEL-EXECUTION-POSTPROCESS
- categoryATOMICITY
- case003
Show exact test source
Sources and references
- Complete stable ID
PTO-AVS-TILE-POSTPROCESS-ROLLBACK-003- Path
tests/asl/tile/model/execution/postprocess/tile-atomic-postprocess-rollback-003.asl- Kind / role
- atomicity
- Requirements
- PTO-MATRIX-POSTPROCESS-BITEXACT-001
- Pass condition
- D RowMaxOut GroupMaxOut allocation flags capacity and source payload remain unchanged
- SHA-256
eb6bfb4b57227a8805ff5b5189112fc0d2e85e64efa2ec7dc18de907e4bbf51d
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
Unit metadata
Open 4 generated metadata fields
Open generated traceability record
{
"classification": [
"model",
"execution",
"postprocess"
],
"documentation": "docs/tile/model/execution/postprocess.md",
"id": "PTO-TILE-MODEL-EXECUTION-POSTPROCESS",
"mnemonic": null,
"readiness_subjects": [],
"semantic_tests": [
"PTO-AVS-TILE-MODEL-EXECUTION-POSTPROCESS-AUX-EXECUTION-001",
"PTO-AVS-TILE-POST-MAXABS-SINGLE-002",
"PTO-AVS-TILE-POSTPROCESS-GROUP-LARGE-004",
"PTO-AVS-TILE-POSTPROCESS-ROLLBACK-003"
],
"source": "asl/tile/model/execution/postprocess.asl",
"surface": "tile",
"tests": [
"PTO-AVS-TILE-MODEL-EXECUTION-POSTPROCESS-AUX-EXECUTION-001",
"PTO-AVS-TILE-MODEL-EXECUTION-POSTPROCESS-STATIC-001",
"PTO-AVS-TILE-POST-MAXABS-SINGLE-002",
"PTO-AVS-TILE-POSTPROCESS-GROUP-LARGE-004",
"PTO-AVS-TILE-POSTPROCESS-ROLLBACK-003"
]
}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/execution/postprocess.asl
- ASL SHA-256
47a814e6745c0b25a1b428de031261c9590b4437eb7e4125c7bbb42f099c1828- Generated documentation
- docs/tile/model/execution/postprocess.md · embedded in this page
- Documentation SHA-256
eb9527d0529609b6e8668f430a4b38cccd8a52960e9dc50cbe9149161115b5fe
Exact owners
- ASL PTO-TILE-MODEL-EXECUTION-POSTPROCESS
asl/tile/model/execution/postprocess.asl