页面框架已切换为简体中文。尚未完成本地化的交互标签暂时使用英文;ASL/NDF 源、稳定标识和证据在所有语言中保持原文。
PTO-TILE-MODEL-EXECUTION-EXPANSION
PTO-TILE-MODEL-EXECUTION-EXPANSIONASL 伪代码
下面直接显示完整的 ASL 所有者。
// PTO-UNIT: {"id":"PTO-TILE-MODEL-EXECUTION-EXPANSION","surface":"tile","classification":["model","execution","expansion"],"depends_on":["PTO-TILE-MODEL-EXECUTION-REDUCTION","PTO-TILE-MODEL-EXECUTION-UNARY"]}// PTO-REQ-TEPL-EXPAND-001: exact typed row and column broadcast operations.
pure func TileExpandBinaryOperation( operation: TileExpandOperation) => TileBinaryOperationbegin case operation of when TileExpand_ADD => return TileBinary_ADD; when TileExpand_SUB => return TileBinary_SUB; when TileExpand_MUL => return TileBinary_MUL; when TileExpand_DIV => return TileBinary_DIV; when TileExpand_MAX => return TileBinary_MAX; when TileExpand_MIN => return TileBinary_MIN; otherwise => unreachable; end;end;
// Mixed EXPDIF owns these conversions locally. They are exact value// widenings for the selected source formats; they are not TCVT and never// produce a conversion-inexact status.pure func ExactWidenBF16ToFP32(value: Word) => Wordbegin return LSL(ZeroExtend{PTO_XLEN}(value[15:0]), 16);end;
pure func ExactWidenFP16ToFP32(value: Word) => Wordbegin let raw = value[15:0]; let sign = raw[15]; let exponent = raw[14:10]; let fraction = raw[9:0]; var result: bits(32) = Zeros{32}; result[31] = sign; if exponent == '11111' then result[30:23] = Ones{8}; if fraction != Zeros{10} then // The selected IEEE profile canonicalizes produced FP32 NaNs. result[31] = '0'; result[22:0] = Zeros{23} + 0x400000; end; elsif exponent != Zeros{5} then result[30:23] = Zeros{8} + (UInt(exponent) + 112); result[22:13] = fraction; elsif fraction != Zeros{10} then var normalized = fraction; var shift_count: integer {0..9} = 0; for shift = 0 to 9 looplimit 10 do if normalized[9] == '0' then normalized = LSL(normalized, 1); shift_count = (shift_count + 1) as integer {0..9}; end; end; result[30:23] = Zeros{8} + (112 - shift_count); result[22:13] = ZeroExtend{10}(normalized[8:0]); end; return ZeroExtend{PTO_XLEN}(result);end;
func TileExpandValueWithTypesAndFlags( operation: TileExpandOperation, source_type: TileDataType, destination_type: TileDataType, left: Word, broadcast: Word) => (Word, bits(5))begin if operation == TileExpand_COPY then return (broadcast, Zeros{5}); end;
if operation == TileExpand_EXPDIF then if source_type != destination_type then assert destination_type == TileDataType_FP32; let widened_left = if source_type == TileDataType_FP16 then ExactWidenFP16ToFP32(left) else ExactWidenBF16ToFP32(left); let widened_broadcast = if source_type == TileDataType_FP16 then ExactWidenFP16ToFP32(broadcast) else ExactWidenBF16ToFP32(broadcast); // The named IEEE profile owns FP32 SUB/EXP for this mixed // path. The operation-local widening above remains portable. let (profile_result, profile_flags) = TileProfileMixedExpdifFP32( source_type, widened_left, widened_broadcast); return ( profile_result, profile_flags); end; let (difference, subtract_flags) = TileProfileBinaryWithFlags( TileBinary_SUB, destination_type, left, broadcast); let (handled, special_result, special_flags) = TileSFUUnarySpecialValue( TileUnary_EXP, destination_type, difference); if handled then return ( special_result, subtract_flags OR special_flags); end; let (profile_result, profile_flags) = TileProfileUnary( TileUnary_EXP, destination_type, difference); return ( profile_result, subtract_flags OR profile_flags); end;
return TileProfileBinaryWithFlags( TileExpandBinaryOperation(operation), destination_type, left, broadcast);end;
impdef func TileProfileMixedExpdifFP32( source_type: TileDataType, left: Word, broadcast: Word) => (Word, bits(5))begin assert source_type == TileDataType_FP16 || source_type == TileDataType_BF16; let (difference, subtract_flags) = TileProfileBinaryWithFlags( TileBinary_SUB, TileDataType_FP32, left, broadcast); let (handled, special_result, special_flags) = TileSFUUnarySpecialValue( TileUnary_EXP, TileDataType_FP32, difference); if handled then return ( special_result, subtract_flags OR special_flags); end; let (profile_result, profile_flags) = TileProfileUnary( TileUnary_EXP, TileDataType_FP32, difference); return ( profile_result, subtract_flags OR profile_flags);end;
impdef func TileProfileExpand(op: TileExpandOperation, data_type: TileDataType, left: Word, broadcast: Word) => Wordbegin return TileExpandValue( op, data_type, left, broadcast);end;
func TileExpandValueWithFlags( operation: TileExpandOperation, data_type: TileDataType, left: Word, broadcast: Word) => (Word, bits(5))begin return TileExpandValueWithTypesAndFlags( operation, data_type, data_type, left, broadcast);end;
func TileExpandValue( operation: TileExpandOperation, data_type: TileDataType, left: Word, broadcast: Word) => Wordbegin let (result, -) = TileExpandValueWithFlags( operation, data_type, left, broadcast); return result;end;
func ExecuteTileExpand(op: TileExpandOperation, axis: TileAxis, destination: TileIndex, source: TileIndex, broadcast_source: TileIndex)begin assert TileOperandsLegal_ExecuteTileExpand( op, axis, destination, source, broadcast_source);
let source_tile = _Tiles[[source]]; let broadcast_tile = _Tiles[[broadcast_source]]; var result_tile = _Tiles[[destination]]; var accumulated_flags = Zeros{5};
for row = 0 to result_tile.valid_rows - 1 looplimit 65536 do for column = 0 to result_tile.valid_columns - 1 looplimit 65536 do let broadcast_row = if axis == TileAxis_Row then row else 0; let broadcast_column = if axis == TileAxis_Row then 0 else column; let broadcast_element = TileLogicalLinearIndex(broadcast_tile, broadcast_row as integer {0..65535}, broadcast_column as integer {0..65535}); var left = TileReadLogicalElement(broadcast_tile, broadcast_element); if op != TileExpand_COPY then let source_element = TileLogicalLinearIndex( source_tile, row as integer {0..65535}, column as integer {0..65535}); left = TileReadLogicalElement(source_tile, source_element); end; let (value, element_flags) = TileExpandValueWithTypesAndFlags( op, source_tile.data_type, result_tile.data_type, left, TileReadLogicalElement(broadcast_tile, broadcast_element)); let destination_element = TileLogicalLinearIndex( result_tile, row as integer {0..65535}, column as integer {0..65535}); result_tile = TileInfoWithLogicalElement(result_tile, destination_element, value); accumulated_flags = accumulated_flags OR element_flags; end; end;
result_tile = TileWithValidRegionDefined(result_tile); result_tile = TileWithPadding( result_tile, CurrentBundlePadValue()); RecordNumericStatusFlags(accumulated_flags); _Tiles[[destination]] = result_tile;end;
架构行为
该内部模型单元不在双语读者指南迁移范围内;请直接阅读本页的 ASL/NDF 所有者与验证证据。
NDF 条款
正文来自 owning ASL。拖拽或按钮只临时改变当前页面显示顺序。
No NDF clause is attached to this unit.
Evidence index
9 matching entries
Executable evidence3
PTO-TILE-MODEL-EXECUTION-EXPANSION compiles as an independent normative unit
- surfaceTILE
- ownerPTO-TILE-MODEL-EXECUTION-EXPANSION
- categorySTATIC-INVARIANT
- case001
Show exact test source
Sources and references
- Complete stable ID
PTO-AVS-TILE-MODEL-EXECUTION-EXPANSION-STATIC-001- Path
tests/asl/tile/model/execution/expansion/tile-static-expansion-contract-001.asl- Kind / role
- static-invariant
- Pass condition
- the complete model and this unit's static invariant compile
- SHA-256
5cba3cde84fda63716707232adbaeb0d1bb5b3b8a1d7af8749aa5ff690a789e0
assigned expansion copy and scalar initialization preserve raw carriers
- surfaceTILE
- ownerPTO-TILE-MODEL-EXECUTION-EXPANSION
- categoryEXECUTION
- case001
Show exact test source
Sources and references
- Complete stable ID
PTO-AVS-TILE-STAGE4-COPY-001- Path
tests/asl/tile/model/execution/expansion/tile-exec-stage4-copy-001.asl- Kind / role
- execution
- Pass condition
- TF32 COPY preserves raw internally invalid encodings and U8 scalar fill retains the low physical-width payload
- SHA-256
d0a06f32e114ae0c21891d9c6775d98a1fd03f7d6f1f944ea815d13d068ad7e9
Covers Tile Expansion.
- surfaceTILE
- ownerPTO-TILE-MODEL-EXECUTION-EXPANSION
- categoryEXECUTION
- case001
Show exact test source
Sources and references
- Complete stable ID
PTO-AVS-TILE-TESTTILEEXPANSION-EXECUTION-001- Path
tests/asl/tile/model/execution/expansion/tile-exec-expansion-operations-001.asl- Kind / role
- execution
- Pass condition
- TestTileExpansion completes without assertion failure
- SHA-256
4a4d067de7ac8253c91255c39880a1147b5c762715c25ab34d56cccd425f5e74
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 history1
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
Unit metadata
Open 4 generated metadata fields
Open generated traceability record
{
"classification": [
"model",
"execution",
"expansion"
],
"documentation": "docs/tile/model/execution/expansion.md",
"id": "PTO-TILE-MODEL-EXECUTION-EXPANSION",
"mnemonic": null,
"readiness_subjects": [
"ADR-0096"
],
"semantic_tests": [
"PTO-AVS-TILE-STAGE4-COPY-001",
"PTO-AVS-TILE-TESTTILEEXPANSION-EXECUTION-001"
],
"source": "asl/tile/model/execution/expansion.asl",
"surface": "tile",
"tests": [
"PTO-AVS-TILE-MODEL-EXECUTION-EXPANSION-STATIC-001",
"PTO-AVS-TILE-STAGE4-COPY-001",
"PTO-AVS-TILE-TESTTILEEXPANSION-EXECUTION-001"
]
}来源与发布信息
展开 commit、路径、hash、版本和规范所有者
- 发布
0.58.5· 候选发布- Commit
7dc8b7e5b121d2b2499a2273bebff29e2cd86812- ASL SHA-256
fdd7540ed145a2958b8f108f9b1f74319ef29a5260b2cf9937aa31d5bd0682e0- 生成文档
- docs/tile/model/execution/expansion.md · 已融合到当前页面
- 文档 SHA-256
6bf6cf4cd117cbcb8514589f0e3fccfdef45a956403bb7018f88a22f624a481d
精确所有者
- ASL PTO-TILE-MODEL-EXECUTION-EXPANSION
asl/tile/model/execution/expansion.asl