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

[query] Fix BAD loop deoptimization with StreamAgg #12995

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

tpoterba
Copy link
Contributor

@tpoterba tpoterba commented May 5, 2023

CHANGELOG: Fixed bug causing poor performance and memory leaks for Matrix.annotate_rows aggregations

CHANGELOG: Fixed bug causing poor performance and memory leaks for Matrix.annotate_rows aggregations
patrick-schultz
patrick-schultz previously approved these changes May 5, 2023
@danking
Copy link
Contributor

danking commented May 9, 2023

bump, has a bug

@danking
Copy link
Contributor

danking commented May 23, 2023

bump

@danking
Copy link
Contributor

danking commented Jun 8, 2023

@patrick-schultz can you adopt this PR?

@patrick-schultz
Copy link
Collaborator

Yeah, I got it

@patrick-schultz
Copy link
Collaborator

@tpoterba I think I understand what was happening. I think NestingDepth wasn't handling aggregation right at all. AggLet was getting its nesting depth from the eval scope, which got compared to the nesting depth of the ref's agg scope. So even if both were at the same level inside an aggregation, we weren't forwarding. We were also ignoring StreamAggScan.

Could you check if this looks right to you?

@patrick-schultz
Copy link
Collaborator

I think there's another separate bug. The problem was that an ir fragment containing a StreamAgg was getting compiled, and it still had an AggLet after LowerArrayAggsToRunAggs. It's now getting inlined, but this should still work even if it isn't inlined. Maybe LowerArrayAggsToRunAggs needs to convert that to a normal Let.

@danking danking merged commit 71ea012 into hail-is:main Jun 29, 2023
@danking
Copy link
Contributor

danking commented Jun 29, 2023

@patrick-schultz can you confirm that you anticipated this to succeed now and it just needed to be retried or something? Just a bit concerning to see a merge after two weeks without changes.

@patrick-schultz
Copy link
Collaborator

Yeah, I've been continually retrying. It was passing non-service tests when I approved two weeks ago.

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.

3 participants