AI4Finance-Foundation / AI4Finance-Foundation/RLSolver
✨ DataParallel and DistributedDataParallel for speed up training.
- Ngôn ngữ chính
- Python
- Star
- 169
- Fork
- 36
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
DataParallel: multiple thread for single machine multiple GPUs
- unbalance GPU memory and GPU usage. ([discuss.pytorch.org: Use `FullModel` which writes loss function into the model to solve the memory usage imbalance problem. ](https://discuss.pytorch.org/t/dataparallel-imbalanced-memory-usage/22551/6))
- slow
- Collecting gradients by a serial method
DistributedDataParallel: multiple processing for single or multiple machines and multiple GPUs.
- balance GPU memory and GPU usage. (don't need to use `FullModel`)
- faster than DataParallel
- [Ring-Allreduce by pytorch](https://pytorch.org/tutorials/intermediate/dist_tuto.html#our-own-ring-allreduce)
It is very easy to add **DataParallel** into the code, but DataParallel brings less speed up.
It's a little tricky to use because **DistributedDataParallel** needs to be started from the command line, but it gives a significant speedup with 4 GPUs in single machine in high GPU memory.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
No files, entry points, or tests are identified in the issue. Start by locating the training code and determining how GPU workers are currently launched, then compare the required DataParallel or DistributedDataParallel integration with the existing training flow. Done should include the selected multi-GPU approach, documented launch usage, and evidence of the intended speed or memory improvement.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python, pytorch
- Lĩnh vực
- distributed-systems, machine-learning, performance
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100