页面框架已切换为简体中文。尚未完成本地化的交互标签暂时使用英文;ASL/NDF 源、稳定标识和证据在所有语言中保持原文。
PTO-TILE-MODEL-LEGALITY-REDUCTION-AND-EXPANSION
PTO-TILE-MODEL-LEGALITY-REDUCTION-AND-EXPANSIONASL 伪代码
下面直接显示完整的 ASL 所有者。
// PTO-UNIT: {"id":"PTO-TILE-MODEL-LEGALITY-REDUCTION-AND-EXPANSION","surface":"tile","classification":["model","legality","reduction-and-expansion"],"depends_on":["PTO-TILE-MODEL-LEGALITY-OPERAND-SCHEMA"]}
readonly func TileOperandsLegal_ExecuteTileReduction( operation: TileReductionOperation, axis: TileAxis, destination: TileIndex, source: TileIndex) => booleanbegin if destination == source || !TileDescriptorLegal(destination) || !TileSourceContentsDefined(source) then return FALSE; end;
let destination_tile = _Tiles[[destination]]; let source_tile = _Tiles[[source]]; let index_reduction = operation == TileReduction_ARGMIN || operation == TileReduction_ARGMAX; let source_type_legal = if index_reduction then TileArgReductionSourceDataTypeSupported(source_tile.data_type) else TileVecArithmeticDataTypeSupported(source_tile.data_type); if destination_tile.storage_kind != TileStorage_Numeric || source_tile.storage_kind != TileStorage_Numeric || destination_tile.layout != TileLayout_RowMajor || source_tile.layout != TileLayout_RowMajor || source_tile.valid_rows == 0 || source_tile.valid_columns == 0 || !source_type_legal || !TileSourceEncodingsValid(source) then return FALSE; end;
if index_reduction then if destination_tile.data_type != TileDataType_S32 && destination_tile.data_type != TileDataType_U32 then return FALSE; end; elsif destination_tile.data_type != source_tile.data_type then return FALSE; end;
if axis == TileAxis_Row then return destination_tile.rows >= source_tile.valid_rows && destination_tile.columns == 1 && destination_tile.valid_rows == source_tile.valid_rows && destination_tile.valid_columns == 1; end; return destination_tile.rows >= 1 && destination_tile.columns == source_tile.columns && destination_tile.valid_rows == 1 && destination_tile.valid_columns == source_tile.valid_columns;end;
pure func TileExpandExpdifTypePairLegal( source_type: TileDataType, destination_type: TileDataType) => booleanbegin return (source_type == TileDataType_FP16 && (destination_type == TileDataType_FP16 || destination_type == TileDataType_FP32)) || (source_type == TileDataType_BF16 && (destination_type == TileDataType_BF16 || destination_type == TileDataType_FP32)) || (source_type == TileDataType_FP32 && destination_type == TileDataType_FP32);end;
readonly func TileOperandsLegal_ExecuteTileExpand( operation: TileExpandOperation, axis: TileAxis, destination: TileIndex, source: TileIndex, broadcast_source: TileIndex) => booleanbegin if !TileDescriptorLegal(destination) || !TileDescriptorLegal(source) || !TileDescriptorLegal(broadcast_source) then return FALSE; end;
let destination_tile = _Tiles[[destination]]; let source_tile = _Tiles[[source]]; let broadcast_tile = _Tiles[[broadcast_source]]; let expdif = operation == TileExpand_EXPDIF; let operation_type_legal = if operation == TileExpand_COPY then TileVecArithmeticDataTypeSupported(destination_tile.data_type) else if expdif then TileExpandExpdifTypePairLegal( source_tile.data_type, destination_tile.data_type) else TileVecArithmeticDataTypeSupported(destination_tile.data_type); if destination_tile.storage_kind != TileStorage_Numeric || destination_tile.layout != TileLayout_RowMajor || destination_tile.valid_rows == 0 || destination_tile.valid_columns == 0 || !operation_type_legal || broadcast_tile.storage_kind != TileStorage_Numeric || broadcast_tile.data_type != (if expdif then source_tile.data_type else destination_tile.data_type) || broadcast_tile.layout != TileLayout_RowMajor || !TileSourceContentsDefined(broadcast_source) || (operation != TileExpand_COPY && !TileSourceEncodingsValid(broadcast_source)) then return FALSE; end;
if operation == TileExpand_COPY then if source != broadcast_source then return FALSE; end; elsif (if expdif then !TileLogicalShapeMatch(destination, source) else !TileShapeAndTypeMatch(destination, source)) || source_tile.storage_kind != TileStorage_Numeric || source_tile.layout != TileLayout_RowMajor || !TileSourceContentsDefined(source) || (operation != TileExpand_COPY && !TileSourceEncodingsValid(source)) then return FALSE; end;
let broadcast_shape_legal = if axis == TileAxis_Row then broadcast_tile.valid_rows == destination_tile.valid_rows && broadcast_tile.valid_columns == 1 && broadcast_tile.columns == 1 else broadcast_tile.valid_rows == 1 && broadcast_tile.valid_columns == destination_tile.valid_columns && broadcast_tile.columns == destination_tile.columns; if !broadcast_shape_legal then return FALSE; end;
if operation == TileExpand_DIV && TileDataTypeIsInteger(destination_tile.data_type) then return TileBroadcastPayloadNonzero( axis, source, broadcast_source); end; return TRUE;end;
架构行为
该内部模型单元不在双语读者指南迁移范围内;请直接阅读本页的 ASL/NDF 所有者与验证证据。
NDF 条款
正文来自 owning ASL。拖拽或按钮只临时改变当前页面显示顺序。
No NDF clause is attached to this unit.
Evidence index
6 matching entries
Executable evidence1
PTO-TILE-MODEL-LEGALITY-REDUCTION-AND-EXPANSION compiles as an independent normative unit
- surfaceTILE
- ownerPTO-TILE-MODEL-LEGALITY-REDUCTION-AND-EXPANSION
- categorySTATIC-INVARIANT
- case001
Show exact test source
Sources and references
- Complete stable ID
PTO-AVS-TILE-MODEL-LEGALITY-REDUCTION-AND-EXPANSION-STATIC-001- Path
tests/asl/tile/model/legality/reduction-and-expansion/tile-static-reduction-and-expansion-contract-001.asl- Kind / role
- static-invariant
- Pass condition
- the complete model and this unit's static invariant compile
- SHA-256
052e6e31624c9efc4bf2b3cfb89dbfc729709fce323e155ab5d854f2195f85ba
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",
"legality",
"reduction-and-expansion"
],
"documentation": "docs/tile/model/legality/reduction-and-expansion.md",
"id": "PTO-TILE-MODEL-LEGALITY-REDUCTION-AND-EXPANSION",
"mnemonic": null,
"readiness_subjects": [],
"semantic_tests": [],
"source": "asl/tile/model/legality/reduction-and-expansion.asl",
"surface": "tile",
"tests": [
"PTO-AVS-TILE-MODEL-LEGALITY-REDUCTION-AND-EXPANSION-STATIC-001"
]
}来源与发布信息
展开 commit、路径、hash、版本和规范所有者
- 发布
0.58.5· 候选发布- Commit
7dc8b7e5b121d2b2499a2273bebff29e2cd86812- ASL SHA-256
eb1c898ae4219734b9ef14c7588e2ee1f49e30417b862da930ae7e45a8f738cf- 生成文档
- docs/tile/model/legality/reduction-and-expansion.md · 已融合到当前页面
- 文档 SHA-256
d4cb73260df4fc71e213475e26e1f8d3b964a27dd0de94298f756a0b0fb2f221
精确所有者
- ASL PTO-TILE-MODEL-LEGALITY-REDUCTION-AND-EXPANSION
asl/tile/model/legality/reduction-and-expansion.asl