Adapt conv tile. - #13
Conversation
| AnyTypeOf<[AnyRankedTensor, TensorViewType, TileBufType], | ||
| "TensorView, TileBuf, or Tensor">; | ||
| AnyTypeOf<[AnyRankedTensor, TensorViewType, TileBufType, ConvTileType], | ||
| "TensorView, TileBuf, ConvTile, or Tensor">; |
There was a problem hiding this comment.
PTOPipeEntryType仅涉及到TPush Tpop等mix kernel op, 这些op应该不支持convtile吧,确认是否需要,不需要的话这个不能添加ConvTile
| def PTODpsType : | ||
| AnyTypeOf<[AnyRankedTensor, PartitionTensorViewType, TileBufType]>; | ||
| AnyTypeOf<[AnyRankedTensor, PartitionTensorViewType, TileBufType, | ||
| ConvTileType]>; |
There was a problem hiding this comment.
PTODpsType涉及到很多不支持convtile的op, 加在这里相当于很多op的输入输出都支持convtile,有需要的话单独定义个type, 不要动这个类型
| AnyTypeOf<[AnyRankedTensor, TensorViewType, PartitionTensorViewType, | ||
| TileBufType], "TensorView, PartitionTensorView, TileBuf, or Tensor">; | ||
| TileBufType, ConvTileType], | ||
| "TensorView, PartitionTensorView, TileBuf, ConvTile, or Tensor">; |
|
|
||
| let results = (outs TileBufType:$result); | ||
| let results = (outs AnyTypeOf<[TileBufType, ConvTileType]>:$result); | ||
|
|
There was a problem hiding this comment.
alloc_tile 结果现在可能是 ConvTile,但基线里至少有多处对 alloc/tile 结果无条件 castpto::TileBufType,本 PR 只适配了 EmitC alloc pattern 和
Utils.cpp::resolveSemanticRange,以下 pass 未适配:
- lib/PTO/Transforms/LowerPTOToUBufOps.cpp:263,272
- lib/PTO/Transforms/PTOA5NormalizeTMovPass.cpp:211-212
- lib/PTO/Transforms/FoldTileBufIntrinsics.cpp:732
- lib/PTO/IR/PTO.cpp:10416
只要 ConvTile 流经任一路径就是 cast<> 断言崩溃。PR 声称"仅 EmitC",但类型系统并不阻止 ConvTile 进入这些 pass。建议:要么在这些 pass 入口对 ConvTile 做
notifyMatchFailure/早退,要么加一个 pipeline 前置校验"ConvTile 只允许出现在 EmitC 路径",把"仅 EmitC"从口头约定变成可验证的约束
| printer << "x"; | ||
| } | ||
| printTileBufDim(printer, dim); | ||
| } |
There was a problem hiding this comment.
ConvTileType 有 hasDynamicShape() helper,printer(printTileBufDim)大概会打印 ?,但 parser 用 parseDimensionList(allowDynamic=false),且各 verifier dim <= 0
会拒绝 kDynamic。即动态维度构造得出来却读不回、过不了校验——hasDynamicShape() 实际是死代码。要么明确不支持动态并删掉该 helper,要么打通。当前语义下建议前者
|
Warning: @and0d0, ci-sim exceeded its soft runtime budget.
This warning is advisory only and does not affect required checks. Please inspect the step timings for an unexpected regression. |
ConvTile:
独立 ConvTileType
复用地址、地址空间、内存规划框架
复用 AllocTileOp、TASSIGN、TLOAD 的操作壳
在 EmitC 中生成 PTO-ISA ConvTile 类型
暂时只承诺 EmitC 后端支持