Skip to content

[Feature Request][Pass] Legalize ForTileNode #48

@weizzh

Description

@weizzh

Required prerequisites

  • I have searched the Issue Tracker that this hasn't already been reported. (comment there if it has.)

Motivation

  1. Currently, T.Tiles are represented as T.Parallel or T.Serial on the frontend, and then processed in the following passes. However, T.Parallel is an op that is mainly called in the LowerTileOp pass, and does not get enough context information when it is called. In order to collect contextual information such as tile_size, dim_view, new_shape, etc., there should be a dedicated pass to do so before the loop is processed in the pass
  2. After the loop has been processed, it may be more efficient and concise to generate tile-level operators with a separate, specialized pass, and avoid coupling too tightly with vectorize code.

Solution

  1. After generating PrimFunc on the front end, construct a Pass to handle: 1. Collecting new_shape, tile_size, and dim_map information; 2. Updating the tiles loop block, specifically: replacing the block's iteration range with new_shape, adding relevant information to the block annotation, and returning the new block.
  2. There might be another dedicated Pass to handle the final Lower process, avoiding direct modification of vectorize.

Alternatives

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions