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

Added sink_alloc #501

Merged
merged 8 commits into from
Oct 2, 2023
Merged

Added sink_alloc #501

merged 8 commits into from
Oct 2, 2023

Conversation

skeqiqevian
Copy link
Collaborator

@skeqiqevian skeqiqevian commented Sep 27, 2023

sink_alloc is roughly the inverse operation of lift_alloc. However, sink_alloc and lift_alloc are incorrect as it stands. The plan is to come back and fix the issue (described below) when we have rewritten analysis.

In writing this scheduling operation, I noticed an analysis error in lift_alloc. However, fixing this analysis requires data dependent analysis.

Consider the following:

def test_lift_and_sink_alloc_should_fail():
    @proc
    def foo1():
        for i in seq(0, 10):
            a: i8[11] @ DRAM
            a[i] += 1.0
            a[i + 1] = 1.0

    @proc
    def foo2():
        a: i8[11] @ DRAM
        for i in seq(0, 10):
            a[i] += 1.0
            a[i + 1] = 1.0

These programs are not equivalent because of the cross-iteration read/write dependencies. However, the current lift_alloc lacks analysis to reason about this and permits this transformation.

@codecov-commenter
Copy link

codecov-commenter commented Sep 27, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (4c6bfdb) 86.73% compared to head (a51d3c1) 86.75%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #501      +/-   ##
==========================================
+ Coverage   86.73%   86.75%   +0.02%     
==========================================
  Files          78       78              
  Lines       18341    18378      +37     
==========================================
+ Hits        15908    15944      +36     
- Misses       2433     2434       +1     
Files Coverage Δ
src/exo/LoopIR_scheduling.py 91.07% <100.00%> (+0.07%) ⬆️
src/exo/internal_cursors.py 95.45% <ø> (ø)
src/exo/stdlib/scheduling.py 83.65% <ø> (ø)
tests/test_schedules.py 99.43% <100.00%> (+<0.01%) ⬆️
src/exo/API_scheduling.py 88.23% <85.71%> (-0.03%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@skeqiqevian skeqiqevian merged commit 7bae34f into master Oct 2, 2023
6 checks passed
@skeqiqevian skeqiqevian deleted the sink_alloc branch October 2, 2023 16:33
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

Successfully merging this pull request may close these issues.

None yet

3 participants