-
Notifications
You must be signed in to change notification settings - Fork 0
Adapt conv tile. #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: set_op
Are you sure you want to change the base?
Adapt conv tile. #13
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,15 +35,17 @@ include "mlir/Interfaces/ViewLikeInterface.td" | |
| //===----------------------------------------------------------------------===// | ||
|
|
||
| def PTODpsType : | ||
| AnyTypeOf<[AnyRankedTensor, PartitionTensorViewType, TileBufType]>; | ||
| AnyTypeOf<[AnyRankedTensor, PartitionTensorViewType, TileBufType, | ||
| ConvTileType]>; | ||
|
|
||
| def PTOPipeEntryType : | ||
| 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PTOPipeEntryType仅涉及到TPush Tpop等mix kernel op, 这些op应该不支持convtile吧,确认是否需要,不需要的话这个不能添加ConvTile |
||
|
|
||
| def PTOCommType : | ||
| AnyTypeOf<[AnyRankedTensor, TensorViewType, PartitionTensorViewType, | ||
| TileBufType], "TensorView, PartitionTensorView, TileBuf, or Tensor">; | ||
| TileBufType, ConvTileType], | ||
| "TensorView, PartitionTensorView, TileBuf, ConvTile, or Tensor">; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 同上 |
||
|
|
||
| def PtrOrMemRef : | ||
| AnyTypeOf<[PtrType, AnyMemRef], "Ptr or MemRef">; | ||
|
|
@@ -331,7 +333,7 @@ def AllocTileOp : PTO_Op<"alloc_tile", [AttrSizedOperandSegments]> { | |
| Optional<Index>:$valid_col | ||
| ); | ||
|
|
||
| let results = (outs TileBufType:$result); | ||
| let results = (outs AnyTypeOf<[TileBufType, ConvTileType]>:$result); | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. alloc_tile 结果现在可能是 ConvTile,但基线里至少有多处对 alloc/tile 结果无条件 castpto::TileBufType,本 PR 只适配了 EmitC alloc pattern 和
只要 ConvTile 流经任一路径就是 cast<> 断言崩溃。PR 声称"仅 EmitC",但类型系统并不阻止 ConvTile 进入这些 pass。建议:要么在这些 pass 入口对 ConvTile 做 |
||
| let assemblyFormat = [{ | ||
| (`addr` `=` $addr^)? | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTODpsType涉及到很多不支持convtile的op, 加在这里相当于很多op的输入输出都支持convtile,有需要的话单独定义个type, 不要动这个类型