Skip to content
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

Leverage local disk for async snapshot #112

Open
yifuwang opened this issue Oct 21, 2022 · 0 comments
Open

Leverage local disk for async snapshot #112

yifuwang opened this issue Oct 21, 2022 · 0 comments

Comments

@yifuwang
Copy link
Contributor

🚀 The feature

Leverage local disk for async snapshot.

Motivation, pitch

TorchSnapshot supports async snapshot, which allows training to resume before the storage I/O of a snapshot completes. For training workloads that are not storage I/O bound, this results in better resource utilization.

Today the feature is implemented roughly as follows:

  • Calculate a RAM budget based on available host resources.
  • Pipeline data from GPU -> RAM -> storage while keeping RAM usage under the budget.
  • Once all data is either moved to RAM or storage, give the control back to training and continue storage I/O in background.

This works well when host RAM is abundant. However, the smaller the RAM budget, the smaller the benefit async snapshot offers over sync snapshot. In such cases, if the target storage is slow (e.g. cloud storage), async snapshot can benefit from leveraging local disk as a staging area in addition to RAM.

Alternatives

No response

Additional context

No response

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

No branches or pull requests

1 participant