KEMBAR78
[PyTorch] Hook up fp16_gemv_trans to gemv fast path for non-aarch64 architectures by swolchok · Pull Request #138005 · pytorch/pytorch · GitHub
Skip to content

Conversation

…rchitectures

Following up on previous rev to use fp16_gemv_trans in gemv, not just gemm-used-for-gemv.

Differential Revision: [D64351092](https://our.internmc.facebook.com/intern/diff/D64351092/)

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 15, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/138005

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 0bd8d1f with merge base 86602a6 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link
Contributor

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

swolchok added a commit that referenced this pull request Oct 15, 2024
…rchitectures

Following up on previous rev to use fp16_gemv_trans in gemv, not just gemm-used-for-gemv.

Differential Revision: [D64351092](https://our.internmc.facebook.com/intern/diff/D64351092/)

ghstack-source-id: 248140851
Pull Request resolved: #138005
…n-aarch64 architectures"

Following up on previous rev to use fp16_gemv_trans in gemv, not just gemm-used-for-gemv.

Differential Revision: [D64351092](https://our.internmc.facebook.com/intern/diff/D64351092/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

@swolchok swolchok added the topic: performance topic category label Oct 17, 2024
@swolchok swolchok requested review from albanD and malfet and removed request for albanD October 17, 2024 23:04
…n-aarch64 architectures"

Following up on previous rev to use fp16_gemv_trans in gemv, not just gemm-used-for-gemv.

Differential Revision: [D64351092](https://our.internmc.facebook.com/intern/diff/D64351092/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

…n-aarch64 architectures"

Following up on previous rev to use fp16_gemv_trans in gemv, not just gemm-used-for-gemv.

Differential Revision: [D64351092](https://our.internmc.facebook.com/intern/diff/D64351092/)

[ghstack-poisoned]
…n-aarch64 architectures"

Following up on previous rev to use fp16_gemv_trans in gemv, not just gemm-used-for-gemv.

Differential Revision: [D64351092](https://our.internmc.facebook.com/intern/diff/D64351092/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

swolchok added a commit that referenced this pull request Oct 24, 2024
…rchitectures

Pull Request resolved: #138005

Following up on previous rev to use fp16_gemv_trans in gemv, not just gemm-used-for-gemv.
ghstack-source-id: 249911241
@exported-using-ghexport

Differential Revision: [D64351092](https://our.internmc.facebook.com/intern/diff/D64351092/)
…n-aarch64 architectures"

Following up on previous rev to use fp16_gemv_trans in gemv, not just gemm-used-for-gemv.

Differential Revision: [D64351092](https://our.internmc.facebook.com/intern/diff/D64351092/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

…n-aarch64 architectures"

Following up on previous rev to use fp16_gemv_trans in gemv, not just gemm-used-for-gemv.

Differential Revision: [D64351092](https://our.internmc.facebook.com/intern/diff/D64351092/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

Copy link
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but we should have half_one and half_zero constants somewhere to avoid doing casts all the time

Comment on lines +305 to +306
alpha.x == fp16_ieee_from_fp32_value(1.0f) &&
beta.x == fp16_ieee_from_fp32_value(0.0f);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fp16_ieee_from_fp32_value calls are very slow, but we have one and zero constants, don't we?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fp16_ieee_from_fp32_value calls are very slow

above comment demonstrates it's constant-foldable

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 31, 2024
…n-aarch64 architectures"

Following up on previous rev to use fp16_gemv_trans in gemv, not just gemm-used-for-gemv.

Differential Revision: [D64351092](https://our.internmc.facebook.com/intern/diff/D64351092/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

…n-aarch64 architectures"

Following up on previous rev to use fp16_gemv_trans in gemv, not just gemm-used-for-gemv.

Differential Revision: [D64351092](https://our.internmc.facebook.com/intern/diff/D64351092/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

…n-aarch64 architectures"

Following up on previous rev to use fp16_gemv_trans in gemv, not just gemm-used-for-gemv.

Differential Revision: [D64351092](https://our.internmc.facebook.com/intern/diff/D64351092/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

pytorchmergebot pushed a commit that referenced this pull request Nov 1, 2024
No real reason to have the zero-beta restriction, so let's lift it.

Testing: intentionally broke new paths locally to verify test coverage existed

Differential Revision: [D64407752](https://our.internmc.facebook.com/intern/diff/D64407752/)

Pull Request resolved: #138275
Approved by: https://github.com/malfet
ghstack dependencies: #139082, #139083, #137918, #138005
rahulsingh-intel pushed a commit to rahulsingh-intel/pytorch that referenced this pull request Nov 5, 2024
…rchitectures (pytorch#138005)

Following up on previous rev to use fp16_gemv_trans in gemv, not just gemm-used-for-gemv.

Differential Revision: [D64351092](https://our.internmc.facebook.com/intern/diff/D64351092/)
Pull Request resolved: pytorch#138005
Approved by: https://github.com/malfet
ghstack dependencies: pytorch#139082, pytorch#139083, pytorch#137918
rahulsingh-intel pushed a commit to rahulsingh-intel/pytorch that referenced this pull request Nov 5, 2024
No real reason to have the zero-beta restriction, so let's lift it.

Testing: intentionally broke new paths locally to verify test coverage existed

Differential Revision: [D64407752](https://our.internmc.facebook.com/intern/diff/D64407752/)

Pull Request resolved: pytorch#138275
Approved by: https://github.com/malfet
ghstack dependencies: pytorch#139082, pytorch#139083, pytorch#137918, pytorch#138005
@github-actions github-actions bot deleted the gh/swolchok/667/head branch December 2, 2024 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged topic: performance topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants