Skip to content

[Feature] 支持一些性能优化特性,第1个第2条影响很大,需要优先支持 #375

@xig514

Description

@xig514

Summary

当前FA的用例存在Cube侧严重的ScalarBound,对应的pto和cpp文件见附件,经过分析大概有以下几个问题:需要ptoas支持:

  1. arith.constant 支持表达成constexpr
  2. pto.alloc_tile addr = %变量 如果在循环外定义,那么循环内只需要TAssign,而不是先定义一个Tile再TAssign,这一步造成的scalar非常严重
  3. 支持变量、常量的数组,Tile数组(Tile数组可以在Tile上加一维)方便EventId的索引,以及DoubleBuffer操作,这一步也会在buffer数量变多时引入比较多的scalar。
    目前以上问题导致通过mlir生成的pto-isa代码在动态shape场景下几乎是完全的scalar bound

Motivation / use case

kernel.cpp
kernel.pto.txt

Proposed API / behavior

No response

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions