-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[llvm] Fix LLVM runtime sparse computation issues #1582
Conversation
70f1a91
to
04c69de
Compare
Codecov Report
@@ Coverage Diff @@
## master #1582 +/- ##
=======================================
Coverage 67.53% 67.53%
=======================================
Files 40 40
Lines 5630 5630
Branches 982 982
=======================================
Hits 3802 3802
Misses 1660 1660
Partials 168 168 Continue to review full report at Codecov.
|
free_list->clear(); | ||
|
||
const i32 num_unused = | ||
max_i32(free_list->size() - allocator->free_list_used, 0); | ||
free_list->resize(num_unused); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a serious memory leakage...
@@ -29,7 +29,9 @@ void convert_to_range_for(OffloadedStmt *offloaded) { | |||
|
|||
////// Begin core transformation | |||
auto body = std::move(offloaded->body); | |||
const int num_loop_vars = snodes.back()->num_active_indices; | |||
const int num_loop_vars = | |||
snodes.empty() ? 0 : snodes.back()->num_active_indices; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes people may do some crazy thing like
for I in ti.grouped(ti.root):
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
[Click here for the format server]