Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/177607
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ You can merge normally! (2 Unrelated Failures)As of commit 34ac1b1 with merge base d5910f0 ( FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
2 similar comments
This PR needs a
|
This PR needs a
|
9bfb932 to
d2beb1f
Compare
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Successfully rebased |
d2beb1f to
fcdf339
Compare
|
xpu ci still fails? |
cc @LuFinch . Could you please help double check XPU CI failures above? I do the rebase yesterday. |
|
@yanbing-j The failed cases in this PR did not throw error in my PR #177608. Seem they are caused by CPU OneDNN upgrade only. |
|
The code base of #177608 is older than this PR. I will rebase later then. |
|
@yanbing-j For XPU, I open a new PR #178249 based on latest main. Let's see the CI result. |
|
Successfully rebased |
2395d01 to
34ac1b1
Compare
|
@atalman has imported this pull request. If you are a Meta employee, you can view this in D100031545. |
|
@yanbing-j @vpirogov I've updated the validation results for AArch64 (edited inline, i hope that's fine), please trigger a merge if all looks fine. |
Hi @atalman , may I confirm whether the internal tests have completed? Were any issues detected? If everything looks good, can we proceed with merging this PR? |
|
@chuanqi129 @yanbing-j are there any blockers for this upgrade? |
Hi @aditew01, we're waiting for the signal of the meta internal tests, please @atalman @malfet help to check it. |
atalman
left a comment
There was a problem hiding this comment.
lgtm. Internal signal looks good
|
@pytorchmergebot merge -f "all tests look good" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
This PR is to upgrade oneDNN to v3.11.2. ## Improvements - Improved fp32 matmul performance with fp4 compressed weights. - Improved fp32 matmul performance for cases when one of the tensors has a trivial dimension on processors with Intel AVX-512 instruction set support. - Improved fp16/bf16 matmul performance for large tensor cases on Intel Graphics for Intel Core Ultra processor Series 3 (formerly Panther Lake). - Improved matmul performance for cases with 4-byte alignment on Intel GPUs based on Xe2 architecture. - Improved performance of fp16/bf16 matmul with mxfp4 weights. - Introduced destination tensor [dynamic quantization](https://uxlfoundation.github.io/oneDNN/v3.11/dev_guide_attributes_quantization.html#dynamic-quantization) in matmul primitive following Open Compute Microscaling (MX) formats specification. - Introduced support for NVFP4 quantization scheme. The changes include support for fp8_e4m3 grouped scales and dynamic quantization support for destination tensor with NVFP4-specific formula for scales computation. - Introduced support for dropout as a primitive attribute for matmul, softmax and eltwise primitives. ## Validation results on Xeon CPU 1. Dynamo benchmarks The test results are based on the 3 dynamo benchmark suites with three data types. <img width="787" height="231" alt="image" src="https://github.com/user-attachments/assets/5e31dc94-4b36-4354-9aa4-3223888d126d" /> According to the local test results, we found that two torchbench models on AMP_BF16 show over 7% performance regression: - `torch_multimodal_clip` has 9% e2e regression. - `BERT_pytorch` has 22% e2e performance regression. # Validation results on Intel B60 Suite | Precision | Shape | Eager Speedup | Inductor Speedup -- | -- | -- | -- | -- Huggingface | BF16 | Static | 1.003 | 1.002 Timm | Bf16 | Static | 1.001 | 0.999 Torchbench | BF16 | Static | 1.003 | 1.000 ## Validation results on AArch64 ### Dynamo Suite: Geomean over latency - prev version vs new version (**Higher is better**) * for 16 Threads Highlights for **Neoverse-V2** : * MobileNetV3 1.15x lower latency with BF16. * Detectron2 **1.6x** lower latency with BF16. * AlexNet **6.2x** lower latency with BF16. | Suite | Precision | Shape | Neoverse-V1 Eager Geomean | Neoverse-V1 Inductor Geomean | Neoverse-V2 Eager Geomean | Neoverse-V2 Inductor Geomean | |------------|-----------|---------|---------------------------|------------------------------|--------------------------|-----------------------------| | HuggingFace | f32 | static | 0.992358837 | 0.995203121 | 1.0062 | 1.007 | | HuggingFace | f32 | dynamic | 0.991266938 | 0.993936984 | 1.0082 | 1.0081 | | HuggingFace | bf16 | static | 1.002295256 | 0.987069391 | 0.997 | 1.0134 | | HuggingFace | bf16 | dynamic | 0.999110791 | 0.993443274 | 1.00108 | 1.0089 | | Timm | f32 | static | 0.989609104 | 0.997575891 | 0.9168 | - | | Timm | f32 | dynamic | 0.988387827 | 0.998601957 | 0.92156 | - | | Timm | bf16 | static | 1.007171058 | 1.01461039 | 0.9925 | 0.9949 | | Timm | bf16 | dynamic | 1.008969741 | 1.016053648 | 0.9928 | 1.0321 | | Torchbench | f32 | static | 0.997158099 | 1.00775975 | 0.96 | - | | Torchbench | f32 | dynamic | 0.998372653 | 1.005439427 | - | - | | Torchbench | bf16 | static | 1.011766848 | 1.02951623 | 0.9815 | 0.98613 | | Torchbench | bf16 | dynamic | 1.017915309 | 1.028806584 | 0.9759 | 0.9831 | ### Torchbenchmark - Geomean over speedup (Higher is better) * on 16 Threads | Suite | Precision | Shape | Neoverse-V1 Eager Geomean | Neoverse-V1 TorchScript Geomean | Neoverse-V2 Eager Geomean | Neoverse-V2 TorchScript Geomean | |------------|-----------|---------|---------------------------|---------------------------------|--------------------------|---------------------------------| | Torchbench | amp_bf16 | inference | 1.00043 | 1.02446 | 1.023 | 1.059 | | Torchbench | amp_bf16 | training | 1.03322 | - | - | - | | Torchbench | fp32 | inference | 1.00452 | 1.00715 | 1.0675 | 1.1086 | | Torchbench | fp32 | training | 1.00121 | - | - | - | ### NLP - FP32 * on 16 threads | Suite | Neoverse-V1 Latency Geomean | Neoverse-V2 Latency Geomean | |-------|-----------------------------|-----------------------------| | NLP | 0.996510961 | 0.99651 | Pull Request resolved: #177607 Approved by: https://github.com/malfet, https://github.com/aditew01, https://github.com/atalman Co-authored-by: fengqing.lu <[email protected]>
This PR is to upgrade oneDNN to v3.11.2. ## Improvements - Improved fp32 matmul performance with fp4 compressed weights. - Improved fp32 matmul performance for cases when one of the tensors has a trivial dimension on processors with Intel AVX-512 instruction set support. - Improved fp16/bf16 matmul performance for large tensor cases on Intel Graphics for Intel Core Ultra processor Series 3 (formerly Panther Lake). - Improved matmul performance for cases with 4-byte alignment on Intel GPUs based on Xe2 architecture. - Improved performance of fp16/bf16 matmul with mxfp4 weights. - Introduced destination tensor [dynamic quantization](https://uxlfoundation.github.io/oneDNN/v3.11/dev_guide_attributes_quantization.html#dynamic-quantization) in matmul primitive following Open Compute Microscaling (MX) formats specification. - Introduced support for NVFP4 quantization scheme. The changes include support for fp8_e4m3 grouped scales and dynamic quantization support for destination tensor with NVFP4-specific formula for scales computation. - Introduced support for dropout as a primitive attribute for matmul, softmax and eltwise primitives. ## Validation results on Xeon CPU 1. Dynamo benchmarks The test results are based on the 3 dynamo benchmark suites with three data types. <img width="787" height="231" alt="image" src="https://github.com/user-attachments/assets/5e31dc94-4b36-4354-9aa4-3223888d126d" /> According to the local test results, we found that two torchbench models on AMP_BF16 show over 7% performance regression: - `torch_multimodal_clip` has 9% e2e regression. - `BERT_pytorch` has 22% e2e performance regression. # Validation results on Intel B60 Suite | Precision | Shape | Eager Speedup | Inductor Speedup -- | -- | -- | -- | -- Huggingface | BF16 | Static | 1.003 | 1.002 Timm | Bf16 | Static | 1.001 | 0.999 Torchbench | BF16 | Static | 1.003 | 1.000 ## Validation results on AArch64 ### Dynamo Suite: Geomean over latency - prev version vs new version (**Higher is better**) * for 16 Threads Highlights for **Neoverse-V2** : * MobileNetV3 1.15x lower latency with BF16. * Detectron2 **1.6x** lower latency with BF16. * AlexNet **6.2x** lower latency with BF16. | Suite | Precision | Shape | Neoverse-V1 Eager Geomean | Neoverse-V1 Inductor Geomean | Neoverse-V2 Eager Geomean | Neoverse-V2 Inductor Geomean | |------------|-----------|---------|---------------------------|------------------------------|--------------------------|-----------------------------| | HuggingFace | f32 | static | 0.992358837 | 0.995203121 | 1.0062 | 1.007 | | HuggingFace | f32 | dynamic | 0.991266938 | 0.993936984 | 1.0082 | 1.0081 | | HuggingFace | bf16 | static | 1.002295256 | 0.987069391 | 0.997 | 1.0134 | | HuggingFace | bf16 | dynamic | 0.999110791 | 0.993443274 | 1.00108 | 1.0089 | | Timm | f32 | static | 0.989609104 | 0.997575891 | 0.9168 | - | | Timm | f32 | dynamic | 0.988387827 | 0.998601957 | 0.92156 | - | | Timm | bf16 | static | 1.007171058 | 1.01461039 | 0.9925 | 0.9949 | | Timm | bf16 | dynamic | 1.008969741 | 1.016053648 | 0.9928 | 1.0321 | | Torchbench | f32 | static | 0.997158099 | 1.00775975 | 0.96 | - | | Torchbench | f32 | dynamic | 0.998372653 | 1.005439427 | - | - | | Torchbench | bf16 | static | 1.011766848 | 1.02951623 | 0.9815 | 0.98613 | | Torchbench | bf16 | dynamic | 1.017915309 | 1.028806584 | 0.9759 | 0.9831 | ### Torchbenchmark - Geomean over speedup (Higher is better) * on 16 Threads | Suite | Precision | Shape | Neoverse-V1 Eager Geomean | Neoverse-V1 TorchScript Geomean | Neoverse-V2 Eager Geomean | Neoverse-V2 TorchScript Geomean | |------------|-----------|---------|---------------------------|---------------------------------|--------------------------|---------------------------------| | Torchbench | amp_bf16 | inference | 1.00043 | 1.02446 | 1.023 | 1.059 | | Torchbench | amp_bf16 | training | 1.03322 | - | - | - | | Torchbench | fp32 | inference | 1.00452 | 1.00715 | 1.0675 | 1.1086 | | Torchbench | fp32 | training | 1.00121 | - | - | - | ### NLP - FP32 * on 16 threads | Suite | Neoverse-V1 Latency Geomean | Neoverse-V2 Latency Geomean | |-------|-----------------------------|-----------------------------| | NLP | 0.996510961 | 0.99651 | Pull Request resolved: pytorch#177607 Approved by: https://github.com/malfet, https://github.com/aditew01, https://github.com/atalman Co-authored-by: fengqing.lu <[email protected]>
…PU page fault in oneDNN MatMul kernel (MFDNN-14479) when head_dim is\nbelow the kernel tiling block size. The oneDNN 3.11.1 upgrade\n(PyTorch pytorch#177607) fixed the original crash (head_dim=96, seq_len=65536)\nbut missed small head_dim values (head_dim=16, seq_len=16413).\n\nRoot cause: can_use_overrideable_attention had no minimum head_dim\ncheck, so shapes that crash oneDNN were still routed to it.\n\nFix: Add minimum head_dim guard in check_head_dim_size_xpu():\n fp32 requires head_dim >= 32 (SIMD16=64B tiling block)\n fp16/bf16 requires head_dim >= 16 (SIMD16=32B tiling block)\n\nFixes: intel/torch-xpu-ops#3394\nReference: MFDNN-14479\nCUDA ref: aten/src/ATen/native/transformers/sdp_utils_cpp.cpp:14-34\n (CUDA has no min check - SIMT handles small dims natively)
This PR is to upgrade oneDNN to v3.11.2. ## Improvements - Improved fp32 matmul performance with fp4 compressed weights. - Improved fp32 matmul performance for cases when one of the tensors has a trivial dimension on processors with Intel AVX-512 instruction set support. - Improved fp16/bf16 matmul performance for large tensor cases on Intel Graphics for Intel Core Ultra processor Series 3 (formerly Panther Lake). - Improved matmul performance for cases with 4-byte alignment on Intel GPUs based on Xe2 architecture. - Improved performance of fp16/bf16 matmul with mxfp4 weights. - Introduced destination tensor [dynamic quantization](https://uxlfoundation.github.io/oneDNN/v3.11/dev_guide_attributes_quantization.html#dynamic-quantization) in matmul primitive following Open Compute Microscaling (MX) formats specification. - Introduced support for NVFP4 quantization scheme. The changes include support for fp8_e4m3 grouped scales and dynamic quantization support for destination tensor with NVFP4-specific formula for scales computation. - Introduced support for dropout as a primitive attribute for matmul, softmax and eltwise primitives. ## Validation results on Xeon CPU 1. Dynamo benchmarks The test results are based on the 3 dynamo benchmark suites with three data types. <img width="787" height="231" alt="image" src="https://github.com/user-attachments/assets/5e31dc94-4b36-4354-9aa4-3223888d126d" /> According to the local test results, we found that two torchbench models on AMP_BF16 show over 7% performance regression: - `torch_multimodal_clip` has 9% e2e regression. - `BERT_pytorch` has 22% e2e performance regression. # Validation results on Intel B60 Suite | Precision | Shape | Eager Speedup | Inductor Speedup -- | -- | -- | -- | -- Huggingface | BF16 | Static | 1.003 | 1.002 Timm | Bf16 | Static | 1.001 | 0.999 Torchbench | BF16 | Static | 1.003 | 1.000 ## Validation results on AArch64 ### Dynamo Suite: Geomean over latency - prev version vs new version (**Higher is better**) * for 16 Threads Highlights for **Neoverse-V2** : * MobileNetV3 1.15x lower latency with BF16. * Detectron2 **1.6x** lower latency with BF16. * AlexNet **6.2x** lower latency with BF16. | Suite | Precision | Shape | Neoverse-V1 Eager Geomean | Neoverse-V1 Inductor Geomean | Neoverse-V2 Eager Geomean | Neoverse-V2 Inductor Geomean | |------------|-----------|---------|---------------------------|------------------------------|--------------------------|-----------------------------| | HuggingFace | f32 | static | 0.992358837 | 0.995203121 | 1.0062 | 1.007 | | HuggingFace | f32 | dynamic | 0.991266938 | 0.993936984 | 1.0082 | 1.0081 | | HuggingFace | bf16 | static | 1.002295256 | 0.987069391 | 0.997 | 1.0134 | | HuggingFace | bf16 | dynamic | 0.999110791 | 0.993443274 | 1.00108 | 1.0089 | | Timm | f32 | static | 0.989609104 | 0.997575891 | 0.9168 | - | | Timm | f32 | dynamic | 0.988387827 | 0.998601957 | 0.92156 | - | | Timm | bf16 | static | 1.007171058 | 1.01461039 | 0.9925 | 0.9949 | | Timm | bf16 | dynamic | 1.008969741 | 1.016053648 | 0.9928 | 1.0321 | | Torchbench | f32 | static | 0.997158099 | 1.00775975 | 0.96 | - | | Torchbench | f32 | dynamic | 0.998372653 | 1.005439427 | - | - | | Torchbench | bf16 | static | 1.011766848 | 1.02951623 | 0.9815 | 0.98613 | | Torchbench | bf16 | dynamic | 1.017915309 | 1.028806584 | 0.9759 | 0.9831 | ### Torchbenchmark - Geomean over speedup (Higher is better) * on 16 Threads | Suite | Precision | Shape | Neoverse-V1 Eager Geomean | Neoverse-V1 TorchScript Geomean | Neoverse-V2 Eager Geomean | Neoverse-V2 TorchScript Geomean | |------------|-----------|---------|---------------------------|---------------------------------|--------------------------|---------------------------------| | Torchbench | amp_bf16 | inference | 1.00043 | 1.02446 | 1.023 | 1.059 | | Torchbench | amp_bf16 | training | 1.03322 | - | - | - | | Torchbench | fp32 | inference | 1.00452 | 1.00715 | 1.0675 | 1.1086 | | Torchbench | fp32 | training | 1.00121 | - | - | - | ### NLP - FP32 * on 16 threads | Suite | Neoverse-V1 Latency Geomean | Neoverse-V2 Latency Geomean | |-------|-----------------------------|-----------------------------| | NLP | 0.996510961 | 0.99651 | Pull Request resolved: pytorch#177607 Approved by: https://github.com/malfet, https://github.com/aditew01, https://github.com/atalman Co-authored-by: fengqing.lu <[email protected]>
This PR is to upgrade oneDNN to v3.11.2. ## Improvements - Improved fp32 matmul performance with fp4 compressed weights. - Improved fp32 matmul performance for cases when one of the tensors has a trivial dimension on processors with Intel AVX-512 instruction set support. - Improved fp16/bf16 matmul performance for large tensor cases on Intel Graphics for Intel Core Ultra processor Series 3 (formerly Panther Lake). - Improved matmul performance for cases with 4-byte alignment on Intel GPUs based on Xe2 architecture. - Improved performance of fp16/bf16 matmul with mxfp4 weights. - Introduced destination tensor [dynamic quantization](https://uxlfoundation.github.io/oneDNN/v3.11/dev_guide_attributes_quantization.html#dynamic-quantization) in matmul primitive following Open Compute Microscaling (MX) formats specification. - Introduced support for NVFP4 quantization scheme. The changes include support for fp8_e4m3 grouped scales and dynamic quantization support for destination tensor with NVFP4-specific formula for scales computation. - Introduced support for dropout as a primitive attribute for matmul, softmax and eltwise primitives. ## Validation results on Xeon CPU 1. Dynamo benchmarks The test results are based on the 3 dynamo benchmark suites with three data types. <img width="787" height="231" alt="image" src="https://github.com/user-attachments/assets/5e31dc94-4b36-4354-9aa4-3223888d126d" /> According to the local test results, we found that two torchbench models on AMP_BF16 show over 7% performance regression: - `torch_multimodal_clip` has 9% e2e regression. - `BERT_pytorch` has 22% e2e performance regression. # Validation results on Intel B60 Suite | Precision | Shape | Eager Speedup | Inductor Speedup -- | -- | -- | -- | -- Huggingface | BF16 | Static | 1.003 | 1.002 Timm | Bf16 | Static | 1.001 | 0.999 Torchbench | BF16 | Static | 1.003 | 1.000 ## Validation results on AArch64 ### Dynamo Suite: Geomean over latency - prev version vs new version (**Higher is better**) * for 16 Threads Highlights for **Neoverse-V2** : * MobileNetV3 1.15x lower latency with BF16. * Detectron2 **1.6x** lower latency with BF16. * AlexNet **6.2x** lower latency with BF16. | Suite | Precision | Shape | Neoverse-V1 Eager Geomean | Neoverse-V1 Inductor Geomean | Neoverse-V2 Eager Geomean | Neoverse-V2 Inductor Geomean | |------------|-----------|---------|---------------------------|------------------------------|--------------------------|-----------------------------| | HuggingFace | f32 | static | 0.992358837 | 0.995203121 | 1.0062 | 1.007 | | HuggingFace | f32 | dynamic | 0.991266938 | 0.993936984 | 1.0082 | 1.0081 | | HuggingFace | bf16 | static | 1.002295256 | 0.987069391 | 0.997 | 1.0134 | | HuggingFace | bf16 | dynamic | 0.999110791 | 0.993443274 | 1.00108 | 1.0089 | | Timm | f32 | static | 0.989609104 | 0.997575891 | 0.9168 | - | | Timm | f32 | dynamic | 0.988387827 | 0.998601957 | 0.92156 | - | | Timm | bf16 | static | 1.007171058 | 1.01461039 | 0.9925 | 0.9949 | | Timm | bf16 | dynamic | 1.008969741 | 1.016053648 | 0.9928 | 1.0321 | | Torchbench | f32 | static | 0.997158099 | 1.00775975 | 0.96 | - | | Torchbench | f32 | dynamic | 0.998372653 | 1.005439427 | - | - | | Torchbench | bf16 | static | 1.011766848 | 1.02951623 | 0.9815 | 0.98613 | | Torchbench | bf16 | dynamic | 1.017915309 | 1.028806584 | 0.9759 | 0.9831 | ### Torchbenchmark - Geomean over speedup (Higher is better) * on 16 Threads | Suite | Precision | Shape | Neoverse-V1 Eager Geomean | Neoverse-V1 TorchScript Geomean | Neoverse-V2 Eager Geomean | Neoverse-V2 TorchScript Geomean | |------------|-----------|---------|---------------------------|---------------------------------|--------------------------|---------------------------------| | Torchbench | amp_bf16 | inference | 1.00043 | 1.02446 | 1.023 | 1.059 | | Torchbench | amp_bf16 | training | 1.03322 | - | - | - | | Torchbench | fp32 | inference | 1.00452 | 1.00715 | 1.0675 | 1.1086 | | Torchbench | fp32 | training | 1.00121 | - | - | - | ### NLP - FP32 * on 16 threads | Suite | Neoverse-V1 Latency Geomean | Neoverse-V2 Latency Geomean | |-------|-----------------------------|-----------------------------| | NLP | 0.996510961 | 0.99651 | Pull Request resolved: pytorch#177607 Approved by: https://github.com/malfet, https://github.com/aditew01, https://github.com/atalman Co-authored-by: fengqing.lu <[email protected]>
This PR is to upgrade oneDNN to v3.11.2.
Improvements
Validation results on Xeon CPU
The test results are based on the 3 dynamo benchmark suites with three data types.
According to the local test results, we found that two torchbench models on AMP_BF16 show over 7% performance regression:
torch_multimodal_cliphas 9% e2e regression.BERT_pytorchhas 22% e2e performance regression.Validation results on Intel B60
Validation results on AArch64
Dynamo Suite: Geomean over latency - prev version vs new version (Higher is better)
Highlights for Neoverse-V2 :
Torchbenchmark - Geomean over speedup (Higher is better)
NLP - FP32
cc @gujinghui @PenghuiCheng @XiaobingSuper @jianyuh @jgong5 @mingfeima @sanchitintel @ashokei @jingxu10 @min-jean-cho @Guobing-Chen @Xia-Weiwen @snadampal