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

[Tracking Issue] Analyze read/write region region recursively for indirectly memory access in cache read/write #64

Open
yzh119 opened this issue Nov 4, 2022 · 0 comments

Comments

@yzh119
Copy link
Member

yzh119 commented Nov 4, 2022

Background

Currently our cache read/write primitive would not analyze read/region region recursively, this means when we cache read A in the following block:

with T.block('blk'):
    T.read(A[indptr[vi], 0:128], indptr[vi])
    ...

Cache read instructions would only generate

with T.block('A_shared'):
    T.read(A[indptr[vi, 0:128])
    T.write(A_shared[indptr[vi: 0:128])
    ...

with T.block('blk'):
    T.read(A_shared[indptr[vi], 0:128], indptr[vi])
    ...

and indptr[vi] would not appear in the cache read block, this is problematic if we want to further cache read indptr array for A_shared block (a common optimization in sparse kernel libraries).

Solution

Add an extra arguments recursive_analysis for (reverse)cache read/write instructions to enable recursive read/write region analysis, this extra argument should default to False so that current behavior would not be influenced.

@yzh119 yzh119 changed the title [Tracking Issue] Analyze read/region region recursively for indirectly memory access in cache read/write [Tracking Issue] Analyze read/write region region recursively for indirectly memory access in cache read/write Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant