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

Jagged tensor micro-benchmarks #3156

Closed
wants to merge 1 commit into from
Closed

Conversation

q10
Copy link
Contributor

@q10 q10 commented Sep 19, 2024

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

  • Add jagged tensor micro-benchmarks
(foo) bash-5.1$ python -W ignore jagged_tensor_benchmark.py device --embedding-dim 512
INFO:root:######## Jagged (2D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 5.746198445558548e-05 sec 438.11657809101143 GB/s
INFO:root:PyTorch NestedTensor: 6.370197981595993e-05 sec 395.1842010676863 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (2D) ########
INFO:root:FBGEMM JaggedTensor: 3.12004815787077e-05 sec 806.880109734599 GB/s
INFO:root:PyTorch NestedTensor: 0.0014418727159500122 sec 17.459249850229323 GB/s
INFO:root:
INFO:root:######## Jagged (x) Dense -> Jagged ########
INFO:root:(+) FBGEMM JaggedTensor: 4.031049832701683e-05 sec 624.9347699856205 GB/s
INFO:root:(+) PyTorch NestedTensor: 0.001540895700454712 sec 16.348564015439923 GB/s
INFO:root:(*) FBGEMM JaggedTensor: 4.03628796339035e-05 sec 624.1237550068162 GB/s
INFO:root:(*) PyTorch NestedTensor: 0.0015746270418167114 sec 15.998348390445281 GB/s
INFO:root:
INFO:root:######## Jagged + Dense + Dense -> Jagged ########
INFO:root:FBGEMM JaggedTensor: 5.2013471722602845e-05 sec 645.7602403302756 GB/s
INFO:root:PyTorch NestedTensor: 0.0028932960033416747 sec 11.608985724656774 GB/s
INFO:root:
INFO:root:######## Jagged (1D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 1.526080071926117e-05 sec 6.511322821651443 GB/s
INFO:root:PyTorch NestedTensor: 3.976528346538544e-05 sec 2.4729108264901147 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (1D) ########
INFO:root:FBGEMM JaggedTensor: 1.5250975266098977e-05 sec 6.51551774665078 GB/s
INFO:root:PyTorch NestedTensor: 0.0014563246965408326 sec 0.06752340342340878 GB/s
INFO:root:
(foo) bash-5.1$

Differential Revision: D59973955

Copy link

netlify bot commented Sep 19, 2024

Deploy Preview for pytorch-fbgemm-docs ready!

Name Link
🔨 Latest commit 9e105ab
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-fbgemm-docs/deploys/66edb97331fe8000071ba94a
😎 Deploy Preview https://deploy-preview-3156--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
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

q10 added a commit to q10/FBGEMM that referenced this pull request Sep 20, 2024
Summary:
Pull Request resolved: pytorch#3156

X-link: facebookresearch/FBGEMM#250

- Add jagged tensor micro-benchmarks

```
(foo) bash-5.1$ python -W ignore jagged_tensor_benchmark.py device --embedding-dim 512
INFO:root:######## Jagged (2D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 5.746198445558548e-05 sec 438.11657809101143 GB/s
INFO:root:PyTorch NestedTensor: 6.370197981595993e-05 sec 395.1842010676863 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (2D) ########
INFO:root:FBGEMM JaggedTensor: 3.12004815787077e-05 sec 806.880109734599 GB/s
INFO:root:PyTorch NestedTensor: 0.0014418727159500122 sec 17.459249850229323 GB/s
INFO:root:
INFO:root:######## Jagged (x) Dense -> Jagged ########
INFO:root:(+) FBGEMM JaggedTensor: 4.031049832701683e-05 sec 624.9347699856205 GB/s
INFO:root:(+) PyTorch NestedTensor: 0.001540895700454712 sec 16.348564015439923 GB/s
INFO:root:(*) FBGEMM JaggedTensor: 4.03628796339035e-05 sec 624.1237550068162 GB/s
INFO:root:(*) PyTorch NestedTensor: 0.0015746270418167114 sec 15.998348390445281 GB/s
INFO:root:
INFO:root:######## Jagged + Dense + Dense -> Jagged ########
INFO:root:FBGEMM JaggedTensor: 5.2013471722602845e-05 sec 645.7602403302756 GB/s
INFO:root:PyTorch NestedTensor: 0.0028932960033416747 sec 11.608985724656774 GB/s
INFO:root:
INFO:root:######## Jagged (1D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 1.526080071926117e-05 sec 6.511322821651443 GB/s
INFO:root:PyTorch NestedTensor: 3.976528346538544e-05 sec 2.4729108264901147 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (1D) ########
INFO:root:FBGEMM JaggedTensor: 1.5250975266098977e-05 sec 6.51551774665078 GB/s
INFO:root:PyTorch NestedTensor: 0.0014563246965408326 sec 0.06752340342340878 GB/s
INFO:root:
(foo) bash-5.1$
```

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

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

q10 added a commit to q10/FBGEMM that referenced this pull request Sep 20, 2024
Summary:
Pull Request resolved: pytorch#3156

X-link: facebookresearch/FBGEMM#250

- Add jagged tensor micro-benchmarks

```
(foo) bash-5.1$ python -W ignore jagged_tensor_benchmark.py device --embedding-dim 512
INFO:root:######## Jagged (2D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 5.746198445558548e-05 sec 438.11657809101143 GB/s
INFO:root:PyTorch NestedTensor: 6.370197981595993e-05 sec 395.1842010676863 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (2D) ########
INFO:root:FBGEMM JaggedTensor: 3.12004815787077e-05 sec 806.880109734599 GB/s
INFO:root:PyTorch NestedTensor: 0.0014418727159500122 sec 17.459249850229323 GB/s
INFO:root:
INFO:root:######## Jagged (x) Dense -> Jagged ########
INFO:root:(+) FBGEMM JaggedTensor: 4.031049832701683e-05 sec 624.9347699856205 GB/s
INFO:root:(+) PyTorch NestedTensor: 0.001540895700454712 sec 16.348564015439923 GB/s
INFO:root:(*) FBGEMM JaggedTensor: 4.03628796339035e-05 sec 624.1237550068162 GB/s
INFO:root:(*) PyTorch NestedTensor: 0.0015746270418167114 sec 15.998348390445281 GB/s
INFO:root:
INFO:root:######## Jagged + Dense + Dense -> Jagged ########
INFO:root:FBGEMM JaggedTensor: 5.2013471722602845e-05 sec 645.7602403302756 GB/s
INFO:root:PyTorch NestedTensor: 0.0028932960033416747 sec 11.608985724656774 GB/s
INFO:root:
INFO:root:######## Jagged (1D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 1.526080071926117e-05 sec 6.511322821651443 GB/s
INFO:root:PyTorch NestedTensor: 3.976528346538544e-05 sec 2.4729108264901147 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (1D) ########
INFO:root:FBGEMM JaggedTensor: 1.5250975266098977e-05 sec 6.51551774665078 GB/s
INFO:root:PyTorch NestedTensor: 0.0014563246965408326 sec 0.06752340342340878 GB/s
INFO:root:
(foo) bash-5.1$
```

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

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

q10 added a commit to q10/FBGEMM that referenced this pull request Sep 20, 2024
Summary:
Pull Request resolved: pytorch#3156

X-link: facebookresearch/FBGEMM#250

- Add jagged tensor micro-benchmarks

```
(foo) bash-5.1$ python -W ignore jagged_tensor_benchmark.py device --embedding-dim 512
INFO:root:######## Jagged (2D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 5.746198445558548e-05 sec 438.11657809101143 GB/s
INFO:root:PyTorch NestedTensor: 6.370197981595993e-05 sec 395.1842010676863 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (2D) ########
INFO:root:FBGEMM JaggedTensor: 3.12004815787077e-05 sec 806.880109734599 GB/s
INFO:root:PyTorch NestedTensor: 0.0014418727159500122 sec 17.459249850229323 GB/s
INFO:root:
INFO:root:######## Jagged (x) Dense -> Jagged ########
INFO:root:(+) FBGEMM JaggedTensor: 4.031049832701683e-05 sec 624.9347699856205 GB/s
INFO:root:(+) PyTorch NestedTensor: 0.001540895700454712 sec 16.348564015439923 GB/s
INFO:root:(*) FBGEMM JaggedTensor: 4.03628796339035e-05 sec 624.1237550068162 GB/s
INFO:root:(*) PyTorch NestedTensor: 0.0015746270418167114 sec 15.998348390445281 GB/s
INFO:root:
INFO:root:######## Jagged + Dense + Dense -> Jagged ########
INFO:root:FBGEMM JaggedTensor: 5.2013471722602845e-05 sec 645.7602403302756 GB/s
INFO:root:PyTorch NestedTensor: 0.0028932960033416747 sec 11.608985724656774 GB/s
INFO:root:
INFO:root:######## Jagged (1D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 1.526080071926117e-05 sec 6.511322821651443 GB/s
INFO:root:PyTorch NestedTensor: 3.976528346538544e-05 sec 2.4729108264901147 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (1D) ########
INFO:root:FBGEMM JaggedTensor: 1.5250975266098977e-05 sec 6.51551774665078 GB/s
INFO:root:PyTorch NestedTensor: 0.0014563246965408326 sec 0.06752340342340878 GB/s
INFO:root:
(foo) bash-5.1$
```

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

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

q10 added a commit to q10/FBGEMM that referenced this pull request Sep 20, 2024
Summary:
Pull Request resolved: pytorch#3156

X-link: facebookresearch/FBGEMM#250

- Add jagged tensor micro-benchmarks

```
(foo) bash-5.1$ python -W ignore jagged_tensor_benchmark.py device --embedding-dim 512
INFO:root:######## Jagged (2D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 5.746198445558548e-05 sec 438.11657809101143 GB/s
INFO:root:PyTorch NestedTensor: 6.370197981595993e-05 sec 395.1842010676863 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (2D) ########
INFO:root:FBGEMM JaggedTensor: 3.12004815787077e-05 sec 806.880109734599 GB/s
INFO:root:PyTorch NestedTensor: 0.0014418727159500122 sec 17.459249850229323 GB/s
INFO:root:
INFO:root:######## Jagged (x) Dense -> Jagged ########
INFO:root:(+) FBGEMM JaggedTensor: 4.031049832701683e-05 sec 624.9347699856205 GB/s
INFO:root:(+) PyTorch NestedTensor: 0.001540895700454712 sec 16.348564015439923 GB/s
INFO:root:(*) FBGEMM JaggedTensor: 4.03628796339035e-05 sec 624.1237550068162 GB/s
INFO:root:(*) PyTorch NestedTensor: 0.0015746270418167114 sec 15.998348390445281 GB/s
INFO:root:
INFO:root:######## Jagged + Dense + Dense -> Jagged ########
INFO:root:FBGEMM JaggedTensor: 5.2013471722602845e-05 sec 645.7602403302756 GB/s
INFO:root:PyTorch NestedTensor: 0.0028932960033416747 sec 11.608985724656774 GB/s
INFO:root:
INFO:root:######## Jagged (1D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 1.526080071926117e-05 sec 6.511322821651443 GB/s
INFO:root:PyTorch NestedTensor: 3.976528346538544e-05 sec 2.4729108264901147 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (1D) ########
INFO:root:FBGEMM JaggedTensor: 1.5250975266098977e-05 sec 6.51551774665078 GB/s
INFO:root:PyTorch NestedTensor: 0.0014563246965408326 sec 0.06752340342340878 GB/s
INFO:root:
(foo) bash-5.1$
```

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

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

q10 added a commit to q10/FBGEMM that referenced this pull request Sep 20, 2024
Summary:
Pull Request resolved: pytorch#3156

X-link: facebookresearch/FBGEMM#250

- Add jagged tensor micro-benchmarks

```
(foo) bash-5.1$ python -W ignore jagged_tensor_benchmark.py device --embedding-dim 512
INFO:root:######## Jagged (2D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 5.746198445558548e-05 sec 438.11657809101143 GB/s
INFO:root:PyTorch NestedTensor: 6.370197981595993e-05 sec 395.1842010676863 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (2D) ########
INFO:root:FBGEMM JaggedTensor: 3.12004815787077e-05 sec 806.880109734599 GB/s
INFO:root:PyTorch NestedTensor: 0.0014418727159500122 sec 17.459249850229323 GB/s
INFO:root:
INFO:root:######## Jagged (x) Dense -> Jagged ########
INFO:root:(+) FBGEMM JaggedTensor: 4.031049832701683e-05 sec 624.9347699856205 GB/s
INFO:root:(+) PyTorch NestedTensor: 0.001540895700454712 sec 16.348564015439923 GB/s
INFO:root:(*) FBGEMM JaggedTensor: 4.03628796339035e-05 sec 624.1237550068162 GB/s
INFO:root:(*) PyTorch NestedTensor: 0.0015746270418167114 sec 15.998348390445281 GB/s
INFO:root:
INFO:root:######## Jagged + Dense + Dense -> Jagged ########
INFO:root:FBGEMM JaggedTensor: 5.2013471722602845e-05 sec 645.7602403302756 GB/s
INFO:root:PyTorch NestedTensor: 0.0028932960033416747 sec 11.608985724656774 GB/s
INFO:root:
INFO:root:######## Jagged (1D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 1.526080071926117e-05 sec 6.511322821651443 GB/s
INFO:root:PyTorch NestedTensor: 3.976528346538544e-05 sec 2.4729108264901147 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (1D) ########
INFO:root:FBGEMM JaggedTensor: 1.5250975266098977e-05 sec 6.51551774665078 GB/s
INFO:root:PyTorch NestedTensor: 0.0014563246965408326 sec 0.06752340342340878 GB/s
INFO:root:
(foo) bash-5.1$
```

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

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

q10 added a commit to q10/FBGEMM that referenced this pull request Sep 20, 2024
Summary:
Pull Request resolved: pytorch#3156

X-link: facebookresearch/FBGEMM#250

- Add jagged tensor micro-benchmarks

```
(foo) bash-5.1$ python -W ignore jagged_tensor_benchmark.py device --embedding-dim 512
INFO:root:######## Jagged (2D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 5.746198445558548e-05 sec 438.11657809101143 GB/s
INFO:root:PyTorch NestedTensor: 6.370197981595993e-05 sec 395.1842010676863 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (2D) ########
INFO:root:FBGEMM JaggedTensor: 3.12004815787077e-05 sec 806.880109734599 GB/s
INFO:root:PyTorch NestedTensor: 0.0014418727159500122 sec 17.459249850229323 GB/s
INFO:root:
INFO:root:######## Jagged (x) Dense -> Jagged ########
INFO:root:(+) FBGEMM JaggedTensor: 4.031049832701683e-05 sec 624.9347699856205 GB/s
INFO:root:(+) PyTorch NestedTensor: 0.001540895700454712 sec 16.348564015439923 GB/s
INFO:root:(*) FBGEMM JaggedTensor: 4.03628796339035e-05 sec 624.1237550068162 GB/s
INFO:root:(*) PyTorch NestedTensor: 0.0015746270418167114 sec 15.998348390445281 GB/s
INFO:root:
INFO:root:######## Jagged + Dense + Dense -> Jagged ########
INFO:root:FBGEMM JaggedTensor: 5.2013471722602845e-05 sec 645.7602403302756 GB/s
INFO:root:PyTorch NestedTensor: 0.0028932960033416747 sec 11.608985724656774 GB/s
INFO:root:
INFO:root:######## Jagged (1D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 1.526080071926117e-05 sec 6.511322821651443 GB/s
INFO:root:PyTorch NestedTensor: 3.976528346538544e-05 sec 2.4729108264901147 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (1D) ########
INFO:root:FBGEMM JaggedTensor: 1.5250975266098977e-05 sec 6.51551774665078 GB/s
INFO:root:PyTorch NestedTensor: 0.0014563246965408326 sec 0.06752340342340878 GB/s
INFO:root:
(foo) bash-5.1$
```

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

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

q10 added a commit to q10/FBGEMM that referenced this pull request Sep 20, 2024
Summary:
Pull Request resolved: pytorch#3156

X-link: facebookresearch/FBGEMM#250

- Add jagged tensor micro-benchmarks

```
(foo) bash-5.1$ python -W ignore jagged_tensor_benchmark.py device --embedding-dim 512
INFO:root:######## Jagged (2D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 5.746198445558548e-05 sec 438.11657809101143 GB/s
INFO:root:PyTorch NestedTensor: 6.370197981595993e-05 sec 395.1842010676863 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (2D) ########
INFO:root:FBGEMM JaggedTensor: 3.12004815787077e-05 sec 806.880109734599 GB/s
INFO:root:PyTorch NestedTensor: 0.0014418727159500122 sec 17.459249850229323 GB/s
INFO:root:
INFO:root:######## Jagged (x) Dense -> Jagged ########
INFO:root:(+) FBGEMM JaggedTensor: 4.031049832701683e-05 sec 624.9347699856205 GB/s
INFO:root:(+) PyTorch NestedTensor: 0.001540895700454712 sec 16.348564015439923 GB/s
INFO:root:(*) FBGEMM JaggedTensor: 4.03628796339035e-05 sec 624.1237550068162 GB/s
INFO:root:(*) PyTorch NestedTensor: 0.0015746270418167114 sec 15.998348390445281 GB/s
INFO:root:
INFO:root:######## Jagged + Dense + Dense -> Jagged ########
INFO:root:FBGEMM JaggedTensor: 5.2013471722602845e-05 sec 645.7602403302756 GB/s
INFO:root:PyTorch NestedTensor: 0.0028932960033416747 sec 11.608985724656774 GB/s
INFO:root:
INFO:root:######## Jagged (1D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 1.526080071926117e-05 sec 6.511322821651443 GB/s
INFO:root:PyTorch NestedTensor: 3.976528346538544e-05 sec 2.4729108264901147 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (1D) ########
INFO:root:FBGEMM JaggedTensor: 1.5250975266098977e-05 sec 6.51551774665078 GB/s
INFO:root:PyTorch NestedTensor: 0.0014563246965408326 sec 0.06752340342340878 GB/s
INFO:root:
(foo) bash-5.1$
```

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

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

q10 added a commit to q10/FBGEMM that referenced this pull request Sep 20, 2024
Summary:
Pull Request resolved: pytorch#3156

X-link: facebookresearch/FBGEMM#250

- Add jagged tensor micro-benchmarks

```
(foo) bash-5.1$ python -W ignore jagged_tensor_benchmark.py device --embedding-dim 512
INFO:root:######## Jagged (2D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 5.746198445558548e-05 sec 438.11657809101143 GB/s
INFO:root:PyTorch NestedTensor: 6.370197981595993e-05 sec 395.1842010676863 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (2D) ########
INFO:root:FBGEMM JaggedTensor: 3.12004815787077e-05 sec 806.880109734599 GB/s
INFO:root:PyTorch NestedTensor: 0.0014418727159500122 sec 17.459249850229323 GB/s
INFO:root:
INFO:root:######## Jagged (x) Dense -> Jagged ########
INFO:root:(+) FBGEMM JaggedTensor: 4.031049832701683e-05 sec 624.9347699856205 GB/s
INFO:root:(+) PyTorch NestedTensor: 0.001540895700454712 sec 16.348564015439923 GB/s
INFO:root:(*) FBGEMM JaggedTensor: 4.03628796339035e-05 sec 624.1237550068162 GB/s
INFO:root:(*) PyTorch NestedTensor: 0.0015746270418167114 sec 15.998348390445281 GB/s
INFO:root:
INFO:root:######## Jagged + Dense + Dense -> Jagged ########
INFO:root:FBGEMM JaggedTensor: 5.2013471722602845e-05 sec 645.7602403302756 GB/s
INFO:root:PyTorch NestedTensor: 0.0028932960033416747 sec 11.608985724656774 GB/s
INFO:root:
INFO:root:######## Jagged (1D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 1.526080071926117e-05 sec 6.511322821651443 GB/s
INFO:root:PyTorch NestedTensor: 3.976528346538544e-05 sec 2.4729108264901147 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (1D) ########
INFO:root:FBGEMM JaggedTensor: 1.5250975266098977e-05 sec 6.51551774665078 GB/s
INFO:root:PyTorch NestedTensor: 0.0014563246965408326 sec 0.06752340342340878 GB/s
INFO:root:
(foo) bash-5.1$
```

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

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

q10 added a commit to q10/FBGEMM that referenced this pull request Sep 20, 2024
Summary:
Pull Request resolved: pytorch#3156

X-link: facebookresearch/FBGEMM#250

- Add jagged tensor micro-benchmarks

```
(foo) bash-5.1$ python -W ignore jagged_tensor_benchmark.py device --embedding-dim 512
INFO:root:######## Jagged (2D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 5.746198445558548e-05 sec 438.11657809101143 GB/s
INFO:root:PyTorch NestedTensor: 6.370197981595993e-05 sec 395.1842010676863 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (2D) ########
INFO:root:FBGEMM JaggedTensor: 3.12004815787077e-05 sec 806.880109734599 GB/s
INFO:root:PyTorch NestedTensor: 0.0014418727159500122 sec 17.459249850229323 GB/s
INFO:root:
INFO:root:######## Jagged (x) Dense -> Jagged ########
INFO:root:(+) FBGEMM JaggedTensor: 4.031049832701683e-05 sec 624.9347699856205 GB/s
INFO:root:(+) PyTorch NestedTensor: 0.001540895700454712 sec 16.348564015439923 GB/s
INFO:root:(*) FBGEMM JaggedTensor: 4.03628796339035e-05 sec 624.1237550068162 GB/s
INFO:root:(*) PyTorch NestedTensor: 0.0015746270418167114 sec 15.998348390445281 GB/s
INFO:root:
INFO:root:######## Jagged + Dense + Dense -> Jagged ########
INFO:root:FBGEMM JaggedTensor: 5.2013471722602845e-05 sec 645.7602403302756 GB/s
INFO:root:PyTorch NestedTensor: 0.0028932960033416747 sec 11.608985724656774 GB/s
INFO:root:
INFO:root:######## Jagged (1D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 1.526080071926117e-05 sec 6.511322821651443 GB/s
INFO:root:PyTorch NestedTensor: 3.976528346538544e-05 sec 2.4729108264901147 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (1D) ########
INFO:root:FBGEMM JaggedTensor: 1.5250975266098977e-05 sec 6.51551774665078 GB/s
INFO:root:PyTorch NestedTensor: 0.0014563246965408326 sec 0.06752340342340878 GB/s
INFO:root:
(foo) bash-5.1$
```

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

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

q10 added a commit to q10/FBGEMM that referenced this pull request Sep 20, 2024
Summary:
Pull Request resolved: pytorch#3156

X-link: facebookresearch/FBGEMM#250

- Add jagged tensor micro-benchmarks

```
(foo) bash-5.1$ python -W ignore jagged_tensor_benchmark.py device --embedding-dim 512
INFO:root:######## Jagged (2D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 5.746198445558548e-05 sec 438.11657809101143 GB/s
INFO:root:PyTorch NestedTensor: 6.370197981595993e-05 sec 395.1842010676863 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (2D) ########
INFO:root:FBGEMM JaggedTensor: 3.12004815787077e-05 sec 806.880109734599 GB/s
INFO:root:PyTorch NestedTensor: 0.0014418727159500122 sec 17.459249850229323 GB/s
INFO:root:
INFO:root:######## Jagged (x) Dense -> Jagged ########
INFO:root:(+) FBGEMM JaggedTensor: 4.031049832701683e-05 sec 624.9347699856205 GB/s
INFO:root:(+) PyTorch NestedTensor: 0.001540895700454712 sec 16.348564015439923 GB/s
INFO:root:(*) FBGEMM JaggedTensor: 4.03628796339035e-05 sec 624.1237550068162 GB/s
INFO:root:(*) PyTorch NestedTensor: 0.0015746270418167114 sec 15.998348390445281 GB/s
INFO:root:
INFO:root:######## Jagged + Dense + Dense -> Jagged ########
INFO:root:FBGEMM JaggedTensor: 5.2013471722602845e-05 sec 645.7602403302756 GB/s
INFO:root:PyTorch NestedTensor: 0.0028932960033416747 sec 11.608985724656774 GB/s
INFO:root:
INFO:root:######## Jagged (1D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 1.526080071926117e-05 sec 6.511322821651443 GB/s
INFO:root:PyTorch NestedTensor: 3.976528346538544e-05 sec 2.4729108264901147 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (1D) ########
INFO:root:FBGEMM JaggedTensor: 1.5250975266098977e-05 sec 6.51551774665078 GB/s
INFO:root:PyTorch NestedTensor: 0.0014563246965408326 sec 0.06752340342340878 GB/s
INFO:root:
(foo) bash-5.1$
```

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

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

q10 added a commit to q10/FBGEMM that referenced this pull request Sep 20, 2024
Summary:
Pull Request resolved: pytorch#3156

X-link: facebookresearch/FBGEMM#250

- Add jagged tensor micro-benchmarks

```
(foo) bash-5.1$ python -W ignore jagged_tensor_benchmark.py device --embedding-dim 512
INFO:root:######## Jagged (2D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 5.746198445558548e-05 sec 438.11657809101143 GB/s
INFO:root:PyTorch NestedTensor: 6.370197981595993e-05 sec 395.1842010676863 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (2D) ########
INFO:root:FBGEMM JaggedTensor: 3.12004815787077e-05 sec 806.880109734599 GB/s
INFO:root:PyTorch NestedTensor: 0.0014418727159500122 sec 17.459249850229323 GB/s
INFO:root:
INFO:root:######## Jagged (x) Dense -> Jagged ########
INFO:root:(+) FBGEMM JaggedTensor: 4.031049832701683e-05 sec 624.9347699856205 GB/s
INFO:root:(+) PyTorch NestedTensor: 0.001540895700454712 sec 16.348564015439923 GB/s
INFO:root:(*) FBGEMM JaggedTensor: 4.03628796339035e-05 sec 624.1237550068162 GB/s
INFO:root:(*) PyTorch NestedTensor: 0.0015746270418167114 sec 15.998348390445281 GB/s
INFO:root:
INFO:root:######## Jagged + Dense + Dense -> Jagged ########
INFO:root:FBGEMM JaggedTensor: 5.2013471722602845e-05 sec 645.7602403302756 GB/s
INFO:root:PyTorch NestedTensor: 0.0028932960033416747 sec 11.608985724656774 GB/s
INFO:root:
INFO:root:######## Jagged (1D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 1.526080071926117e-05 sec 6.511322821651443 GB/s
INFO:root:PyTorch NestedTensor: 3.976528346538544e-05 sec 2.4729108264901147 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (1D) ########
INFO:root:FBGEMM JaggedTensor: 1.5250975266098977e-05 sec 6.51551774665078 GB/s
INFO:root:PyTorch NestedTensor: 0.0014563246965408326 sec 0.06752340342340878 GB/s
INFO:root:
(foo) bash-5.1$
```

Differential Revision: D59973955
Summary:
Pull Request resolved: pytorch#3156

X-link: facebookresearch/FBGEMM#250

- Add jagged tensor micro-benchmarks

```
(foo) bash-5.1$ python -W ignore jagged_tensor_benchmark.py device --embedding-dim 512
INFO:root:######## Jagged (2D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 5.746198445558548e-05 sec 438.11657809101143 GB/s
INFO:root:PyTorch NestedTensor: 6.370197981595993e-05 sec 395.1842010676863 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (2D) ########
INFO:root:FBGEMM JaggedTensor: 3.12004815787077e-05 sec 806.880109734599 GB/s
INFO:root:PyTorch NestedTensor: 0.0014418727159500122 sec 17.459249850229323 GB/s
INFO:root:
INFO:root:######## Jagged (x) Dense -> Jagged ########
INFO:root:(+) FBGEMM JaggedTensor: 4.031049832701683e-05 sec 624.9347699856205 GB/s
INFO:root:(+) PyTorch NestedTensor: 0.001540895700454712 sec 16.348564015439923 GB/s
INFO:root:(*) FBGEMM JaggedTensor: 4.03628796339035e-05 sec 624.1237550068162 GB/s
INFO:root:(*) PyTorch NestedTensor: 0.0015746270418167114 sec 15.998348390445281 GB/s
INFO:root:
INFO:root:######## Jagged + Dense + Dense -> Jagged ########
INFO:root:FBGEMM JaggedTensor: 5.2013471722602845e-05 sec 645.7602403302756 GB/s
INFO:root:PyTorch NestedTensor: 0.0028932960033416747 sec 11.608985724656774 GB/s
INFO:root:
INFO:root:######## Jagged (1D) to Dense ########
INFO:root:FBGEMM JaggedTensor: 1.526080071926117e-05 sec 6.511322821651443 GB/s
INFO:root:PyTorch NestedTensor: 3.976528346538544e-05 sec 2.4729108264901147 GB/s
INFO:root:
INFO:root:######## Dense to Jagged (1D) ########
INFO:root:FBGEMM JaggedTensor: 1.5250975266098977e-05 sec 6.51551774665078 GB/s
INFO:root:PyTorch NestedTensor: 0.0014563246965408326 sec 0.06752340342340878 GB/s
INFO:root:
(foo) bash-5.1$
```

Reviewed By: spcyppt

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

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in f305522.

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