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

[llvm] Fix LLVM runtime sparse computation issues #1582

Merged
merged 2 commits into from
Jul 25, 2020

Conversation

yuanming-hu
Copy link
Member

@yuanming-hu yuanming-hu commented Jul 25, 2020

@yuanming-hu yuanming-hu marked this pull request as draft July 25, 2020 04:53
@codecov
Copy link

codecov bot commented Jul 25, 2020

Codecov Report

Merging #1582 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c37c04...04c69de. Read the comment docs.

Comment on lines -1328 to +1339
free_list->clear();

const i32 num_unused =
max_i32(free_list->size() - allocator->free_list_used, 0);
free_list->resize(num_unused);

Copy link
Member Author

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;
Copy link
Member Author

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):
   ...

@yuanming-hu yuanming-hu marked this pull request as ready for review July 25, 2020 05:33
@yuanming-hu yuanming-hu requested a review from k-ye July 25, 2020 05:33
Copy link
Member

@k-ye k-ye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

@yuanming-hu yuanming-hu merged commit a0eb4fe into taichi-dev:master Jul 25, 2020
@yuanming-hu yuanming-hu mentioned this pull request Jul 25, 2020
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.

2 participants