forked from pytorch/FBGEMM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor improvements in GEMM Kernels (pytorch#368)
Summary: Pull Request resolved: pytorch#368 1) Replace vxorps with vpxor. vpxor can execute on multiple ports. Also zero-out xmm and ymm/zmm are zeroed out implicitly. 2) Use integer version of vmov (On some architectures there is some penalty for fp to integer vector lane changes) Reference: https://stackoverflow.com/questions/33666617/what-is-the-best-way-to-set-a-register-to-zero-in-x86-assembly-xor-mov-or-and No significant change in performance. Before: ``` M, N, K, Type, GOPS 64, 800, 320, MKL_fp32, 46.3 64, 800, 320, FBGEMM_i8_acc32, 83.6 64, 800, 320, FBGEMM_i8_acc16, 79.2 64, 768, 512, MKL_fp32, 46.9 64, 768, 512, FBGEMM_i8_acc32, 88.1 64, 768, 512, FBGEMM_i8_acc16, 89.2 16, 256, 512, MKL_fp32, 27.6 16, 256, 512, FBGEMM_i8_acc32, 43.5 16, 256, 512, FBGEMM_i8_acc16, 54.1 128, 128, 128, MKL_fp32, 30.1 128, 128, 128, FBGEMM_i8_acc32, 42.1 128, 128, 128, FBGEMM_i8_acc16, 40.6 256, 512, 256, MKL_fp32, 44.8 256, 512, 256, FBGEMM_i8_acc32, 91.7 256, 512, 256, FBGEMM_i8_acc16, 91.1 1024, 1024, 1024, MKL_fp32, 48.8 1024, 1024, 1024, FBGEMM_i8_acc32, 97.0 1024, 1024, 1024, FBGEMM_i8_acc16, 97.6 ``` After: ``` M, N, K, Type, GOPS 64, 800, 320, MKL_fp32, 46.2 64, 800, 320, FBGEMM_i8_acc32, 83.5 64, 800, 320, FBGEMM_i8_acc16, 80.8 64, 768, 512, MKL_fp32, 47.2 64, 768, 512, FBGEMM_i8_acc32, 88.5 64, 768, 512, FBGEMM_i8_acc16, 87.3 16, 256, 512, MKL_fp32, 26.0 16, 256, 512, FBGEMM_i8_acc32, 44.0 16, 256, 512, FBGEMM_i8_acc16, 54.5 128, 128, 128, MKL_fp32, 29.6 128, 128, 128, FBGEMM_i8_acc32, 42.2 128, 128, 128, FBGEMM_i8_acc16, 38.5 256, 512, 256, MKL_fp32, 44.3 256, 512, 256, FBGEMM_i8_acc32, 91.1 256, 512, 256, FBGEMM_i8_acc16, 91.0 1024, 1024, 1024, MKL_fp32, 48.7 1024, 1024, 1024, FBGEMM_i8_acc32, 96.6 1024, 1024, 1024, FBGEMM_i8_acc16, 96.5 ``` Reviewed By: jspark1105 Differential Revision: D21433384 fbshipit-source-id: d0abd56f454293e159d3fda9d94bc84e011060c8
- Loading branch information
1 parent
7ed5f9f
commit 46981b8
Showing
7 changed files
with
29 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters