ut-parla / Parla.py

A Python based programming system for heterogeneous computing
Other
21 stars 9 forks source link

Update resource managing #125

Open nicelhc13 opened 2 years ago

nicelhc13 commented 2 years ago

This PR updates two main things: 1) replace lock-based resource tracking with lock-free one by making the scheduler manage. 2) move resource updates from mapping to launching; it blocked task scheduling critically.

With this update, on 2000 independent tasks + with GIL + 76000 microsec for each task + depth 100 (5MB), it took 7 sec for each iteration.

Without this, it took more than 130 sec for each iteration.

wlruys commented 2 years ago

Main concern is that I think @sestephens73 had a bunch of reasons for moving resource allocation for mapping. Want to make sure we can resolve those before moving it back.

nicelhc13 commented 2 years ago

yes please point me out. regardless of that this pr works, the main bottleneck was that updating resources at mapping is bad.

nicelhc13 commented 2 years ago

let me also add @yinengy for the review.