-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[python] Add multi-threaded prefetch for pytorch streaming read #7143
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
base: master
Are you sure you want to change the base?
[python] Add multi-threaded prefetch for pytorch streaming read #7143
Conversation
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.
Maybe async is enough? Multiple threads may consume too many memory. And has there been any performance test to measure the improvement?
Current read is synchronous. Yes, we have the performance test of data loader, single thread 200MB/s vs 260~270MB/s with 16 worker (process) and 10 prefetch threads. |
The multi-thread prefetch idea in this PR is from OSS connector of pytorch’s config. |
Can you share the code link? |
Seems native code is not open source. python code is https://github.com/aliyun/oss-connector-for-ai-ml,doc: https://github.com/aliyun/oss-connector-for-ai-ml/blob/a9b536d174163f0cd6db8e83261fcffc628e5f8c/docs/torchconnector/configuration.md?plain=1#L94 but python code do nothing. The logic is in native side. |
Purpose
Linked issue: close #xxx
Tests
API and Format
Documentation