Skip to content
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

[TIR][Schedule] Scoped CacheRead/Write producing compact region #15236

Merged

Commits on Jul 6, 2023

  1. [TIR][Schedule] Scoped CacheRead/Write producing compact region

    This PR enhances CacheRead/Write so that when a cache operation is
    performed under an inner block, the generated cache buffer will have
    the shape as compact as possible, by region consumption analysis.
    
    The motivation of this change comes from the needs of dynamic shape TIR
    scheduling, in which case we may isolate a "static shape" internal block
    using blockize, and do further scheduling inside the internal block. For
    such cases, the current CacheRead/Write inside the static-shape block
    will still produce dynamic-shape cache buffers, which is not ideal for
    analysis and subsequent scheduling.
    
    One thing that worths noting is that, to ensure the IR correctness after
    inserting the cache block, we will only compact the cache buffer when
    all the consumer blocks of the read buffer (for CacheRead) or the write
    buffer (for CacheWrite) are children blocks of the cache block insertion
    location. Otherwise we will insist allocating the full-size cache
    buffer.
    
    Co-authored-by: Bohan Hou <spectrometerh@gmail.com>
    MasterJH5574 and spectrometerHBH committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    1d432c5 View commit details
    Browse the repository at this point in the history