Skip to content

Conversation

@XiaoHongbo-Hope
Copy link
Contributor

Purpose

Linked issue: close #xxx

Tests

API and Format

Documentation

@XiaoHongbo-Hope XiaoHongbo-Hope changed the title [python] Add multi-threaded prefetch for PyTorch streaming read [python] Add multi-threaded prefetch for pytorch streaming read Jan 28, 2026
@XiaoHongbo-Hope XiaoHongbo-Hope marked this pull request as ready for review January 28, 2026 14:22
@XiaoHongbo-Hope XiaoHongbo-Hope marked this pull request as draft January 28, 2026 15:22
@XiaoHongbo-Hope XiaoHongbo-Hope marked this pull request as ready for review January 31, 2026 07:26
@XiaoHongbo-Hope XiaoHongbo-Hope marked this pull request as draft January 31, 2026 08:21
@XiaoHongbo-Hope XiaoHongbo-Hope marked this pull request as ready for review January 31, 2026 08:54
Copy link
Contributor

@JingsongLi JingsongLi left a 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?

@XiaoHongbo-Hope
Copy link
Contributor Author

XiaoHongbo-Hope commented Jan 31, 2026

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.

@XiaoHongbo-Hope
Copy link
Contributor Author

Maybe async is enough? Multiple threads may consume too many memory. And has there been any performance test to measure the improvement?

The multi-thread prefetch idea in this PR is from OSS connector of pytorch’s config.

@JingsongLi
Copy link
Contributor

Maybe async is enough? Multiple threads may consume too many memory. And has there been any performance test to measure the improvement?

The multi-thread prefetch idea in this PR is from OSS connector of pytorch’s config.

Can you share the code link?

@XiaoHongbo-Hope
Copy link
Contributor Author

XiaoHongbo-Hope commented Feb 2, 2026

Maybe async is enough? Multiple threads may consume too many memory. And has there been any performance test to measure the improvement?

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.

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