Skip to content

Creating ReadOnlyEmbeddingKVDB class and necessary functions #4225

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

Closed
wants to merge 5 commits into from

Conversation

Raahul46
Copy link

Summary:
X-link: https://github.com/facebookresearch/FBGEMM/pull/1301

Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class.

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Differential Revision: D75489873

Copy link

netlify bot commented May 30, 2025

Deploy Preview for pytorch-fbgemm-docs ready!

Name Link
🔨 Latest commit 886e16f
🔍 Latest deploy log https://app.netlify.com/projects/pytorch-fbgemm-docs/deploys/6841dcf88474740008bcd9ed
😎 Deploy Preview https://deploy-preview-4225--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 project configuration.

@facebook-github-bot
Copy link
Contributor

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

@Raahul46 Raahul46 force-pushed the export-D75489873 branch from a94062d to 1ffac12 Compare June 4, 2025 18:40
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 4, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Differential Revision: D75489873
@Raahul46 Raahul46 force-pushed the export-D75489873 branch from 1ffac12 to 71af63f Compare June 4, 2025 18:41
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 4, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Differential Revision: D75489873
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 4, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Differential Revision: D75489873
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 4, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Differential Revision: D75489873
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 4, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
@facebook-github-bot
Copy link
Contributor

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

Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 4, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 4, 2025
…#4225)

Summary:
Pull Request resolved: pytorch#4225

X-link: facebookresearch/FBGEMM#1301

Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class.

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
@Raahul46 Raahul46 force-pushed the export-D75489873 branch from 71af63f to 6c70898 Compare June 4, 2025 18:44
@facebook-github-bot
Copy link
Contributor

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

@Raahul46 Raahul46 force-pushed the export-D75489873 branch from 6c70898 to c358b86 Compare June 4, 2025 19:08
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 4, 2025
…#4225)

Summary:
Pull Request resolved: pytorch#4225

X-link: facebookresearch/FBGEMM#1301

Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class.

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
@Raahul46 Raahul46 force-pushed the export-D75489873 branch from c358b86 to 6347c90 Compare June 5, 2025 02:16
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 5, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
@Raahul46 Raahul46 force-pushed the export-D75489873 branch from 6347c90 to 669f83c Compare June 5, 2025 02:17
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 5, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
@facebook-github-bot
Copy link
Contributor

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

Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 5, 2025
…#4225)

Summary:
Pull Request resolved: pytorch#4225

X-link: facebookresearch/FBGEMM#1301

Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class.

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
@Raahul46 Raahul46 force-pushed the export-D75489873 branch from 669f83c to 432090b Compare June 5, 2025 02:18
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 5, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 5, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 5, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 5, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
@Raahul46 Raahul46 force-pushed the export-D75489873 branch from 432090b to 34aad47 Compare June 5, 2025 02:23
@facebook-github-bot
Copy link
Contributor

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

1 similar comment
@facebook-github-bot
Copy link
Contributor

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

Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 5, 2025
…#4225)

Summary:
Pull Request resolved: pytorch#4225

X-link: facebookresearch/FBGEMM#1301

Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class.

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
@Raahul46 Raahul46 force-pushed the export-D75489873 branch from 34aad47 to 33da6c9 Compare June 5, 2025 02:27
raahul46 added 4 commits June 5, 2025 10:29
Differential Revision: D75489819
Differential Revision: D75489827
Differential Revision: D75489841
Differential Revision: D75489849
@Raahul46 Raahul46 force-pushed the export-D75489873 branch from 33da6c9 to cb2a2e7 Compare June 5, 2025 17:59
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 5, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
@Raahul46 Raahul46 force-pushed the export-D75489873 branch from cb2a2e7 to 9ab7366 Compare June 5, 2025 18:00
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 5, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 5, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 5, 2025
…#4225)

Summary:

X-link: facebookresearch/FBGEMM#1301



Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold 

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class. 

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
@facebook-github-bot
Copy link
Contributor

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

Raahul46 pushed a commit to Raahul46/FBGEMM-1 that referenced this pull request Jun 5, 2025
…#4225)

Summary:
Pull Request resolved: pytorch#4225

X-link: facebookresearch/FBGEMM#1301

Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class.

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
@Raahul46 Raahul46 force-pushed the export-D75489873 branch from 9ab7366 to 2cc9cb7 Compare June 5, 2025 18:03
…#4225)

Summary:
Pull Request resolved: pytorch#4225

X-link: facebookresearch/FBGEMM#1301

Design doc: https://docs.google.com/document/d/149LdAEHOLP7ei4hwVVkAFXGa4N9uLs1J7efxfBZp3dY/edit?tab=t.0#heading=h.49t3yfaqmt54

Context:
We are enabling the usage of rocksDB checkpoint feature in KVTensorWrapper. This allows us to create checkpoints of the embedding tables in SSD. Later, these checkpoints are used by the checkpointing component to create a checkpoint and upload it it to the manifold

In this diff:
The primary objective of adding the checkpointhandle is to allow multiple process read through the KVTensor. To enable this, we would require to create a read-only KVTensor object that can be read concurrently.

To support this, we introduce an ReadOnlyEmbedding KVDB class which is a read-only implementation of EmbeddingKVDB class.

We have added a new constructor to the KVTensorWrapper which takes in a serialized KVTensor meta data. When deserializing, we create a readOnlyEmbeddingKVDB for the KVTensorWrapper object

Reviewed By: duduyi2013

Differential Revision: D75489873
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 2283ec6.

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