Skip to content

Fix KleidiAI FP16 #3769

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
Closed

Fix KleidiAI FP16 #3769

wants to merge 1 commit into from

Conversation

Nicoshev
Copy link
Contributor

@Nicoshev Nicoshev commented Mar 5, 2025

Summary:
FP32Test was failing when KleidiAI was enabled.

It turns out FPCommon.h and PackMatrixB.h were not acconditioned to handle using kleidAI for FP16 and not for FP32

Differential Revision: D70606808

Copy link

netlify bot commented Mar 5, 2025

Deploy Preview for pytorch-fbgemm-docs ready!

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

@facebook-github-bot
Copy link
Contributor

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

@Nicoshev Nicoshev force-pushed the export-D70606808 branch 2 times, most recently from 3cccf41 to 426d983 Compare March 5, 2025 23:07
Nicoshev added a commit to Nicoshev/FBGEMM that referenced this pull request Mar 5, 2025
Summary:

X-link: facebookresearch/FBGEMM#849

FP32Test was failing when KleidiAI was enabled.

It turns out FPCommon.h and PackMatrixB.h were not acconditioned to handle using kleidAI for FP16 and not for FP32

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

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

Nicoshev added a commit to Nicoshev/FBGEMM that referenced this pull request Mar 5, 2025
Summary:
Pull Request resolved: pytorch#3769

X-link: facebookresearch/FBGEMM#849

FP32Test was failing when KleidiAI was enabled.

It turns out FPCommon.h and PackMatrixB.h were not acconditioned to handle using kleidAI for FP16 and not for FP32

Differential Revision: D70606808
@Nicoshev Nicoshev force-pushed the export-D70606808 branch 2 times, most recently from 9df54cc to bf5b9aa Compare March 5, 2025 23:51
Nicoshev added a commit to Nicoshev/FBGEMM that referenced this pull request Mar 5, 2025
Summary:

X-link: facebookresearch/FBGEMM#849

FP32Test was failing when KleidiAI was enabled.

It turns out FPCommon.h and PackMatrixB.h were not acconditioned to handle using kleidAI for FP16 and not for FP32

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

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

Nicoshev added a commit to Nicoshev/FBGEMM that referenced this pull request Mar 5, 2025
Summary:
Pull Request resolved: pytorch#3769

X-link: facebookresearch/FBGEMM#849

FP32Test was failing when KleidiAI was enabled.

It turns out FPCommon.h and PackMatrixB.h were not acconditioned to handle using kleidAI for FP16 and not for FP32

Differential Revision: D70606808
@Nicoshev Nicoshev force-pushed the export-D70606808 branch 2 times, most recently from eb22db6 to 2400c83 Compare March 10, 2025 20:14
Nicoshev added a commit to Nicoshev/FBGEMM that referenced this pull request Mar 10, 2025
Summary:

X-link: facebookresearch/FBGEMM#849

FP32Test was failing when KleidiAI was enabled.

It turns out FPCommon.h and PackMatrixB.h were not acconditioned to handle using kleidAI for FP16 and not for FP32

PackedGemmMatrixFP16 constructors were moved to a .cc file, compiled with the rest of fbgemm.
This ensures the KleidiAI flag is set when compiling such code.
Previously, consumers of the library would include FbgemmPackMatrixB.h from their .cpp files. Because the KleidiAI flag was not set when compiling their code, the intended case for the float16 was never run.

Additionally, we have ingested a change in KleidiAI's inline assembly, which handles nan beta values as 0.

Reviewed By: psaab

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

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

Nicoshev added a commit to Nicoshev/FBGEMM that referenced this pull request Mar 10, 2025
Summary:

X-link: facebookresearch/FBGEMM#849

FP32Test was failing when KleidiAI was enabled.

It turns out FPCommon.h and PackMatrixB.h were not acconditioned to handle using kleidAI for FP16 and not for FP32

PackedGemmMatrixFP16 constructors were moved to a .cc file, compiled with the rest of fbgemm.
This ensures the KleidiAI flag is set when compiling such code.
Previously, consumers of the library would include FbgemmPackMatrixB.h from their .cpp files. Because the KleidiAI flag was not set when compiling their code, the intended case for the float16 was never run.

Additionally, we have ingested a change in KleidiAI's inline assembly, which handles nan beta values as 0.

Reviewed By: psaab

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

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

Nicoshev added a commit to Nicoshev/FBGEMM that referenced this pull request Mar 10, 2025
Summary:
Pull Request resolved: pytorch#3769

X-link: facebookresearch/FBGEMM#849

FP32Test was failing when KleidiAI was enabled.

It turns out FPCommon.h and PackMatrixB.h were not acconditioned to handle using kleidAI for FP16 and not for FP32

PackedGemmMatrixFP16 constructors were moved to a .cc file, compiled with the rest of fbgemm.
This ensures the KleidiAI flag is set when compiling such code.
Previously, consumers of the library would include FbgemmPackMatrixB.h from their .cpp files. Because the KleidiAI flag was not set when compiling their code, the intended case for the float16 was never run.

Additionally, we have ingested a change in KleidiAI's inline assembly, which handles nan beta values as 0.

Reviewed By: psaab

Differential Revision: D70606808
@Nicoshev Nicoshev force-pushed the export-D70606808 branch 2 times, most recently from c2d560a to eb3c685 Compare March 11, 2025 16:54
Nicoshev added a commit to Nicoshev/FBGEMM that referenced this pull request Mar 11, 2025
Summary:

X-link: facebookresearch/FBGEMM#849

FP32Test was failing when KleidiAI was enabled.

It turns out FPCommon.h and PackMatrixB.h were not acconditioned to handle using kleidAI for FP16 and not for FP32

PackedGemmMatrixFP16 constructors were moved to a .cc file, compiled with the rest of fbgemm.
This ensures the KleidiAI flag is set when compiling such code.
Previously, consumers of the library would include FbgemmPackMatrixB.h from their .cpp files. Because the KleidiAI flag was not set when compiling their code, the intended case for the float16 was never run.

Additionally, we have ingested a change in KleidiAI's inline assembly, which handles nan beta values as 0.

Reviewed By: psaab

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

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

Nicoshev added a commit to Nicoshev/FBGEMM that referenced this pull request Mar 11, 2025
Summary:
Pull Request resolved: pytorch#3769

X-link: facebookresearch/FBGEMM#849

FP32Test was failing when KleidiAI was enabled.

It turns out FPCommon.h and PackMatrixB.h were not acconditioned to handle using kleidAI for FP16 and not for FP32

PackedGemmMatrixFP16 constructors were moved to a .cc file, compiled with the rest of fbgemm.
This ensures the KleidiAI flag is set when compiling such code.
Previously, consumers of the library would include FbgemmPackMatrixB.h from their .cpp files. Because the KleidiAI flag was not set when compiling their code, the intended case for the float16 was never run.

Additionally, we have ingested a change in KleidiAI's inline assembly, which handles nan beta values as 0.

Reviewed By: psaab

Differential Revision: D70606808
Nicoshev added a commit to Nicoshev/FBGEMM that referenced this pull request Mar 11, 2025
Summary:

X-link: facebookresearch/FBGEMM#849

FP32Test was failing when KleidiAI was enabled.

It turns out FPCommon.h and PackMatrixB.h were not acconditioned to handle using kleidAI for FP16 and not for FP32

PackedGemmMatrixFP16 constructors were moved to a .cc file, compiled with the rest of fbgemm.
This ensures the KleidiAI flag is set when compiling such code.
Previously, consumers of the library would include FbgemmPackMatrixB.h from their .cpp files. Because the KleidiAI flag was not set when compiling their code, the intended case for the float16 was never run.

Additionally, we have ingested a change in KleidiAI's inline assembly, which handles nan beta values as 0.

Reviewed By: psaab

Differential Revision: D70606808
Summary:
Pull Request resolved: pytorch#3769

X-link: facebookresearch/FBGEMM#849

FP32Test was failing when KleidiAI was enabled.

It turns out FPCommon.h and PackMatrixB.h were not acconditioned to handle using kleidAI for FP16 and not for FP32

PackedGemmMatrixFP16 constructors were moved to a .cc file, compiled with the rest of fbgemm.
This ensures the KleidiAI flag is set when compiling such code.
Previously, consumers of the library would include FbgemmPackMatrixB.h from their .cpp files. Because the KleidiAI flag was not set when compiling their code, the intended case for the float16 was never run.

Additionally, we have ingested a change in KleidiAI's inline assembly, which handles nan beta values as 0.

Reviewed By: psaab

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

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in d17faaa.

liligwu pushed a commit to ROCm/FBGEMM that referenced this pull request Mar 14, 2025
Summary:
Pull Request resolved: pytorch#3769

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

FP32Test was failing when KleidiAI was enabled.

It turns out FPCommon.h and PackMatrixB.h were not acconditioned to handle using kleidAI for FP16 and not for FP32

PackedGemmMatrixFP16 constructors were moved to a .cc file, compiled with the rest of fbgemm.
This ensures the KleidiAI flag is set when compiling such code.
Previously, consumers of the library would include FbgemmPackMatrixB.h from their .cpp files. Because the KleidiAI flag was not set when compiling their code, the intended case for the float16 was never run.

Additionally, we have ingested a change in KleidiAI's inline assembly, which handles nan beta values as 0.

Reviewed By: psaab

Differential Revision: D70606808

fbshipit-source-id: b5ada2519eee65e826fa5647967a23db30911f23
q10 pushed a commit to q10/FBGEMM that referenced this pull request Apr 10, 2025
Summary:
X-link: pytorch#3769

Pull Request resolved: facebookresearch/FBGEMM#849

FP32Test was failing when KleidiAI was enabled.

It turns out FPCommon.h and PackMatrixB.h were not acconditioned to handle using kleidAI for FP16 and not for FP32

PackedGemmMatrixFP16 constructors were moved to a .cc file, compiled with the rest of fbgemm.
This ensures the KleidiAI flag is set when compiling such code.
Previously, consumers of the library would include FbgemmPackMatrixB.h from their .cpp files. Because the KleidiAI flag was not set when compiling their code, the intended case for the float16 was never run.

Additionally, we have ingested a change in KleidiAI's inline assembly, which handles nan beta values as 0.

Reviewed By: psaab

Differential Revision: D70606808

fbshipit-source-id: b5ada2519eee65e826fa5647967a23db30911f23
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