blue-oil / blueoil

Bring Deep Learning to small devices
https://blueoil.org
Apache License 2.0
248 stars 86 forks source link

Improve performance of dataset_itertator in prepetch mode #1229

Closed lm-takumi-nakaso closed 3 years ago

lm-takumi-nakaso commented 4 years ago

Improve performance of dataset_itertator in prepetch mode

Change the number of threads from fixed 8 to cpu cores. Share a single process pool with multiple dataset_iterators. Use a single thread per process.

Use loky to achieve this.

CLAassistant commented 4 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

bo-code-review-bot[bot] commented 4 years ago

This PR needs Approvals as follows.

Please choose reviewers and requet reviews!

Click to see how to approve each reviews You can approve this PR by triggered comments as follows. * Approve all reviews requested to you (readability and ownership) and LGTM review `Approval, LGTM` * Approve all ownership reviews `Ownership Approval` or `OA` * Approve all readability reviews `Readability Approval` or `RA` * Approve specified review targets * Example of Ownership Reviewer of `/`: `Ownership Approval for /` or `OA for /` * Example of Readability Reviewer of `Python`: `Readability Approval for Python` or `RA for Python` * Approve LGTM review `LGTM`
See all trigger comments Please replace [Target] to review target * Ownership Approval * Ownership Approval for [Target] * OA for [Target] * Ownership Approval * OA * Approval * Readability Approval * Readability Approval for [Target] * RA for [Target] * [Target] Readability Approval * [Target] RA * Readability Approval * RA * Approval * LGTM * LGTM * lgtm
iizukak commented 4 years ago

@lm-takumi-nakaso Thank you for the contribution!! Could you add the speed comparison before and after of this PR?