Skip to content

Async initialization of RockDB SSD tensors#3520

Closed
mradmila wants to merge 1 commit into
pytorch:mainfrom
mradmila:export-D67480511
Closed

Async initialization of RockDB SSD tensors#3520
mradmila wants to merge 1 commit into
pytorch:mainfrom
mradmila:export-D67480511

Conversation

@mradmila

Copy link
Copy Markdown

Summary:
In the diff D66465811 we introduced a bulk initialization function _insert_all_kv for ssd tensors. However, large tensors take a long time to fully initialize, and ideally this can happen in the background so it doesn't increase TTFB of the training jobs.

This change does exactly that, moves this initialization to a separate thread, allowing other initialization in the training job, like reading data, to happen concurrently. In order to avoid pushing synchronization to the user space, this change introduces getter and setter for ssd_db, which ensure initialization is fully done before weights are used.

Reviewed By: duduyi2013

Differential Revision: D67480511

@netlify

netlify Bot commented Dec 20, 2024

Copy link
Copy Markdown

Deploy Preview for pytorch-fbgemm-docs ready!

Name Link
🔨 Latest commit 2e60bf5
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-fbgemm-docs/deploys/6765bedffc62ea000853c059
😎 Deploy Preview https://deploy-preview-3520--pytorch-fbgemm-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D67480511

mradmila pushed a commit to mradmila/FBGEMM-1 that referenced this pull request Dec 20, 2024
Summary:
X-link: facebookresearch/FBGEMM#602


In the diff D66465811 we introduced a bulk initialization function `_insert_all_kv` for ssd tensors. However, large tensors take a long time to fully initialize, and ideally this can happen in the background so it doesn't increase TTFB of the training jobs.

This change does exactly that, moves this initialization to a separate thread, allowing other initialization in the training job, like reading data, to happen concurrently. In order to avoid pushing synchronization to the user space, this change introduces getter and setter for ssd_db, which ensure initialization is fully done before weights are used.

Reviewed By: duduyi2013, jiayulu

Differential Revision: D67480511
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D67480511

Summary:
X-link: facebookresearch/FBGEMM#602


In the diff D66465811 we introduced a bulk initialization function `_insert_all_kv` for ssd tensors. However, large tensors take a long time to fully initialize, and ideally this can happen in the background so it doesn't increase TTFB of the training jobs.

This change does exactly that, moves this initialization to a separate thread, allowing other initialization in the training job, like reading data, to happen concurrently. In order to avoid pushing synchronization to the user space, this change introduces getter and setter for ssd_db, which ensure initialization is fully done before weights are used.

Reviewed By: duduyi2013, jiayulu

Differential Revision: D67480511
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D67480511

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in 5d6dd92.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants