Skip to content

Implement generate_vbe_metadata cpu #3715

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 1 commit into from

Conversation

spcyppt
Copy link
Contributor

@spcyppt spcyppt commented Feb 19, 2025

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

This diff implements generate_vbe_metadata for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap

Differential Revision: D69162870

@facebook-github-bot
Copy link
Contributor

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

Copy link

netlify bot commented Feb 19, 2025

Deploy Preview for pytorch-fbgemm-docs ready!

Name Link
🔨 Latest commit 3892615
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-fbgemm-docs/deploys/67c771523b8b030008f01eab
😎 Deploy Preview https://deploy-preview-3715--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.

spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Feb 21, 2025
Summary:

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

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

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

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

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

spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Feb 21, 2025
Summary:
Pull Request resolved: pytorch#3715

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

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

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

spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Feb 21, 2025
Summary:
Pull Request resolved: pytorch#3715

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Differential Revision: D69162870
spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Feb 26, 2025
Summary:

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Differential Revision: D69162870
spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Feb 26, 2025
Summary:

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Differential Revision: D69162870
@spcyppt spcyppt force-pushed the export-D69162870 branch 2 times, most recently from 3a59542 to 104fc25 Compare March 3, 2025 22:42
spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Mar 3, 2025
Summary:

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap

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

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

@spcyppt spcyppt force-pushed the export-D69162870 branch from 104fc25 to ea6a843 Compare March 4, 2025 04:29
spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Mar 4, 2025
Summary:

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap

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

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

@spcyppt spcyppt force-pushed the export-D69162870 branch from ea6a843 to 5ab0b9b Compare March 4, 2025 04:36
spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Mar 4, 2025
Summary:

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap

Differential Revision: D69162870
spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Mar 4, 2025
Summary:

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap

Differential Revision: D69162870
@spcyppt spcyppt force-pushed the export-D69162870 branch from 5ab0b9b to bb38a62 Compare March 4, 2025 04:37
@facebook-github-bot
Copy link
Contributor

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

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

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

spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Mar 4, 2025
Summary:
Pull Request resolved: pytorch#3715

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap

Differential Revision: D69162870
@spcyppt spcyppt force-pushed the export-D69162870 branch from f990938 to cd6d50b Compare March 4, 2025 06:31
spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Mar 4, 2025
Summary:

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap, nautsimon

Differential Revision: D69162870
@spcyppt spcyppt force-pushed the export-D69162870 branch from cd6d50b to 791a482 Compare March 4, 2025 06:32
@facebook-github-bot
Copy link
Contributor

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

spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Mar 4, 2025
Summary:
Pull Request resolved: pytorch#3715

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap, nautsimon

Differential Revision: D69162870
@spcyppt spcyppt force-pushed the export-D69162870 branch from 791a482 to 7adeb1c Compare March 4, 2025 06:35
@facebook-github-bot
Copy link
Contributor

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

spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Mar 4, 2025
Summary:
Pull Request resolved: pytorch#3715

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap, nautsimon

Differential Revision: D69162870
@spcyppt spcyppt force-pushed the export-D69162870 branch from 7adeb1c to be33b5b Compare March 4, 2025 06:47
spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Mar 4, 2025
Summary:

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap, nautsimon

Differential Revision: D69162870
@spcyppt spcyppt force-pushed the export-D69162870 branch from be33b5b to 4b55c11 Compare March 4, 2025 21:14
spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Mar 4, 2025
Summary:

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap, nautsimon

Differential Revision: D69162870
@spcyppt spcyppt force-pushed the export-D69162870 branch from 4b55c11 to 9222538 Compare March 4, 2025 21:15
@facebook-github-bot
Copy link
Contributor

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

spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Mar 4, 2025
Summary:
Pull Request resolved: pytorch#3715

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap, nautsimon

Differential Revision: D69162870
@spcyppt spcyppt force-pushed the export-D69162870 branch from 9222538 to 0f37ada Compare March 4, 2025 21:19
Summary:
Pull Request resolved: pytorch#3715

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap, nautsimon

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

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

@spcyppt spcyppt force-pushed the export-D69162870 branch from 0f37ada to 3892615 Compare March 4, 2025 21:32
spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Mar 5, 2025
Summary:

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap, nautsimon

Differential Revision: D69162870
spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Mar 5, 2025
Summary:

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap, nautsimon

Differential Revision: D69162870
spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Mar 5, 2025
Summary:

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap, nautsimon

Differential Revision: D69162870
spcyppt added a commit to spcyppt/FBGEMM that referenced this pull request Mar 5, 2025
Summary:
Pull Request resolved: pytorch#3715

X-link: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap, nautsimon

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

This pull request has been merged in f0ff8bb.

q10 pushed a commit to q10/FBGEMM that referenced this pull request Apr 10, 2025
Summary:
X-link: pytorch#3715

Pull Request resolved: facebookresearch/FBGEMM#796

This diff implements `generate_vbe_metadata` for cpu, such that the function returns the same output for CPU, CUDA and MTIA.

To support VBE on CPU with existing fixed-batch-size CPU kernel, we need to recompute offsets, which is previously done in python. This diff implements offsets recomputation in C++ such that all manipulations are done in C++.

Note that reshaping offsets and grad_input to work with existing fixed-batch-size CPU kernels are done in Autograd instead of wrapper to avoid multiple computations.

VBE CPU tests are in the next diff.

Reviewed By: sryap, nautsimon

Differential Revision: D69162870

fbshipit-source-id: 08c6e45b8f0d319b96371acaba0d9a27570a1bd7
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.

3 participants