Skip to content

[Tracking Issue] BufferAccess Migration Followup Items #10505

@tqchen

Description

@tqchen

This is a tracking issue created for followup tracking items in #9727.

The particular PR contains an important new feature(transform_layout). The main goal of this issue is to do followup shepherding around the IR change part(buffer access and related allocations), which have a broader impact. The particular PR takes many rounds of reviews and but still have quite a few points that would benefit from systematic clarification, cleanup and further polish.

Given that there is an important followup(of layout transform) that depend on the change, and the PR is already at a state where incremental changes can further block the progress as other concurrent changes are made. We took the deliberation to merge PR, then continue to do post-hoc shepherding. This decision is supposed to happen in rare circumstance with clear followup actions to backup the decisions.

This is the tracking issue for followup shepherd actions

High-level gist of change

Load/Store are deprecated and changes to BufferLoad/Store of 1D array. BufferLoad/Store of 1D elements are being used in the place of Load/Store. Overall this is a good directly as we unify more analysis onto the (possibly multi-dimensional) buffer access, opens doors for special memory unit that are in nature multi-dimensional.

However, we do need more clarifications and systematic review/cleanup (see check list).

Check List

  • Clarify the buffer access rule, aliasing and allocation rules
  • Buffer.data pointer type and buffer element type relation
  • Create a migration guide for people to upgrade from the Load/Store
  • Use WithIndices for NormalizeDType
  • Find alternative to preflatten_buffer_map (possible via buffer redeclaration)
  • Discuss and narrow down the scope of address_of, ideally to 1D acess
  • Discuss and clarify the scope of vector buffer indexing rule (RFC: clarifying buffer declaration and access tvm-rfcs#63)
  • Post-hoc Revisit key passes involved
    • CodegenLLVM
    • StorageRewrite
    • Vectorize
    • VectorPointerTypeRewrite
    • ThreadStorageSync
    • StorageFlatten
    • MergeDynamicSharedMemoryLocations
    • LowerWarpMemory
    • LowerThreadAllreduce
    • NarrowDataType
    • Other passes that are involved in the refactoring

cc @Hzfengsy @junrushao

Metadata

Metadata

Assignees

Labels

tetirany TIR core issues which don’t fit into other tir: labels (include/tvm/tir, src/tir)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions