We present SPDL (Scalable and Performant Data Loading), an open-source, framework-agnostic library designed for efficiently loading array data to GPU. Data loading is often a bottleneck in AI applications, and is challenging to optimize because it requires coordination of network calls, CPU-bound tasks, and GPU device transfer. On top of that, Python's GIL (Global Interpreter Lock) makes it difficult to gain performance improvement from multi-threading. We found that when data preprocessing functions release the GIL entirely, it is possible to execute them concurrently in a thread pool, thereby improving the workflow performance. Our benchmark shows that compared to the PyTorch DataLoader, SPDL can iterate through the ImageNet dataset 74% faster while using 38% less CPU and 50GB less memory. When training ViT-B/16 model, SPDL can send data to the GPU at a speed that does not starve the training. Additionally, when using SPDL on Python 3.13t, without changing any code, the throughput is further by improved by 33%, thanks to the disabled GIL. SPDL can improve the performance of current AI model training, and receives further performance improvements when Free-Threaded Python is adopted in production systems. SPDL is available at https://github.com/facebookresearch/spdl.


翻译:暂无翻译

0
下载
关闭预览

相关内容

类O1复现项目数据和模型开源啦
专知会员服务
36+阅读 · 2024年12月24日
AAAI2025|TrustUQA:统一结构化数据问答的可信框架
专知会员服务
20+阅读 · 2024年12月20日
【电子书】大数据挖掘,Mining of Massive Datasets,附513页PDF
专知会员服务
105+阅读 · 2020年3月22日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
非平衡数据集 focal loss 多类分类
AI研习社
33+阅读 · 2019年4月23日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
【数据集】新的YELP数据集官方下载
机器学习研究会
16+阅读 · 2017年8月31日
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Arxiv
17+阅读 · 2023年12月4日
On Feature Normalization and Data Augmentation
Arxiv
15+阅读 · 2020年2月25日
VIP会员
相关VIP内容
类O1复现项目数据和模型开源啦
专知会员服务
36+阅读 · 2024年12月24日
AAAI2025|TrustUQA:统一结构化数据问答的可信框架
专知会员服务
20+阅读 · 2024年12月20日
【电子书】大数据挖掘,Mining of Massive Datasets,附513页PDF
专知会员服务
105+阅读 · 2020年3月22日
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
非平衡数据集 focal loss 多类分类
AI研习社
33+阅读 · 2019年4月23日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
【数据集】新的YELP数据集官方下载
机器学习研究会
16+阅读 · 2017年8月31日
相关基金
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员