Skip to content

Commit 7715d62

Browse files
Andrew - Executorch fix and Wednesday blog (#1784)
* wednesday blog post * test for todays date * executorch paragraph removal and addition of button + new blog post for Tuesday * change date to Friday
1 parent 844ffad commit 7715d62

File tree

5 files changed

+303
-4
lines changed

5 files changed

+303
-4
lines changed
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
---
2+
layout: blog_detail
3+
title: "PyTorch 2.5 Release Blog"
4+
---
5+
6+
We are excited to announce the release of PyTorch® 2.5 ([release note](https://github.com/pytorch/pytorch/releases/tag/v2.5.0))! This release features a new CuDNN backend for SDPA, enabling speedups by default for users of SDPA on H100s or newer GPUs. As well, regional compilation of torch.compile offers a way to reduce the cold start up time for torch.compile by allowing users to compile a repeated nn.Module (e.g. a transformer layer in LLM) without recompilations. Finally, TorchInductor CPP backend offers solid performance speedup with numerous enhancements like FP16 support, CPP wrapper, AOT-Inductor mode, and max-autotune mode.
7+
8+
This release is composed of 4095 commits from 504 contributors since PyTorch 2.4. We want to sincerely thank our dedicated community for your contributions. As always, we encourage you to try these out and report any issues as we improve 2.5. More information about how to get started with the PyTorch 2-series can be found at our [Getting Started](https://pytorch.org/get-started/pytorch-2.0/) page.
9+
10+
As well, please check out our new ecosystem projects releases with [TorchRec](https://github.com/pytorch/torchrec) and [TorchFix](https://github.com/pytorch-labs/torchfix/releases/tag/v0.6.0).
11+
12+
13+
<table class="table table-bordered">
14+
<tr>
15+
<td>Beta
16+
</td>
17+
<td>Prototype
18+
</td>
19+
</tr>
20+
<tr>
21+
<td>CuDNN backend for SDPA
22+
</td>
23+
<td>FlexAttention
24+
</td>
25+
</tr>
26+
<tr>
27+
<td>torch.compile regional compilation without recompilations
28+
</td>
29+
<td>Compiled Autograd
30+
</td>
31+
</tr>
32+
<tr>
33+
<td>TorchDynamo added support for exception handling & MutableMapping types
34+
</td>
35+
<td>Flight Recorder
36+
</td>
37+
</tr>
38+
<tr>
39+
<td>TorchInductor CPU backend optimization
40+
</td>
41+
<td>Max-autotune Support on CPU with GEMM Template
42+
</td>
43+
</tr>
44+
<tr>
45+
<td>
46+
</td>
47+
<td>TorchInductor on Windows
48+
</td>
49+
</tr>
50+
<tr>
51+
<td>
52+
</td>
53+
<td>FP16 support on CPU path for both eager mode and TorchInductor CPP backend
54+
</td>
55+
</tr>
56+
<tr>
57+
<td>
58+
</td>
59+
<td>Autoload Device Extension
60+
</td>
61+
</tr>
62+
<tr>
63+
<td>
64+
</td>
65+
<td>Enhanced Intel GPU support
66+
</td>
67+
</tr>
68+
</table>
69+
70+
71+
*To see a full list of public feature submissions click [here](https://docs.google.com/spreadsheets/d/1TzGkWuUMF1yTe88adz1dt2mzbIsZLd3PBasy588VWgk/edit?usp=sharing).
72+
73+
74+
## BETA FEATURES
75+
76+
77+
### [Beta] CuDNN backend for SDPA
78+
79+
The cuDNN "Fused Flash Attention" backend was landed for *torch.nn.functional.scaled_dot_product_attention*. On NVIDIA H100 GPUs this can provide up to 75% speed-up over FlashAttentionV2. This speedup is enabled by default for all users of SDPA on H100 or newer GPUs.
80+
81+
82+
### [Beta] *torch.compile* regional compilation without recompilations
83+
84+
Regional compilation without recompilations, via *torch._dynamo.config.inline_inbuilt_nn_modules* which default to True in 2.5+. This option allows users to compile a repeated *nn.Module* (e.g. a transformer layer in LLM) without recompilations. Compared to compiling the full model, this option can result in smaller compilation latencies with 1%-5% performance degradation compared to full model compilation.
85+
86+
See the [tutorial](https://pytorch.org/tutorials/recipes/regional_compilation.html) for more information.
87+
88+
89+
### [Beta] TorchInductor CPU backend optimization
90+
91+
This feature advances Inductor’s CPU backend optimization, including CPP backend code generation and FX fusions with customized CPU kernels. The Inductor CPU backend supports vectorization of common data types and all Inductor IR operations, along with the static and symbolic shapes. It is compatible with both Linux and Windows OS and supports the default Python wrapper, the CPP wrapper, and AOT-Inductor mode.
92+
93+
Additionally, it extends the max-autotune mode of the GEMM template (prototyped in 2.5), offering further performance gains. The backend supports various FX fusions, lowering to customized kernels such as oneDNN for Linear/Conv operations and SDPA. The Inductor CPU backend consistently achieves performance speedups across three benchmark suites—TorchBench, Hugging Face, and timms—outperforming eager mode in 97.5% of the 193 models tested.
94+
95+
96+
## PROTOTYPE FEATURES
97+
98+
99+
### [Prototype] FlexAttention
100+
101+
We've introduced a flexible API that enables implementing various attention mechanisms such as Sliding Window, Causal Mask, and PrefixLM with just a few lines of idiomatic PyTorch code. This API leverages torch.compile to generate a fused FlashAttention kernel, which eliminates extra memory allocation and achieves performance comparable to handwritten implementations. Additionally, we automatically generate the backwards pass using PyTorch's autograd machinery. Furthermore, our API can take advantage of sparsity in the attention mask, resulting in significant improvements over standard attention implementations.
102+
103+
For more information and examples, please refer to the [official blog post](https://pytorch.org/blog/flexattention/) and [Attention Gym](https://github.com/pytorch-labs/attention-gym).
104+
105+
106+
### [Prototype] Compiled Autograd
107+
108+
Compiled Autograd is an extension to the PT2 stack allowing the capture of the entire backward pass. Unlike the backward graph traced by AOT dispatcher, Compiled Autograd tracing is deferred until backward execution time, which makes it impervious to forward pass graph breaks, and allows it to record backward hooks into the graph.
109+
110+
Please refer to the [tutorial](https://pytorch.org/tutorials/intermediate/compiled_autograd_tutorial.html) for more information.
111+
112+
113+
### [Prototype] Flight Recorder
114+
115+
Flight recorder is a new debugging tool that helps debug stuck jobs. The tool works by continuously capturing information about collectives as they run. Upon detecting a stuck job, the information can be used to quickly identify misbehaving ranks/machines along with code stack traces.
116+
117+
For more information please refer to the following [tutorial](https://pytorch.org/tutorials/prototype/flight_recorder_tutorial.html).
118+
119+
120+
### [Prototype] Max-autotune Support on CPU with GEMM Template
121+
122+
Max-autotune mode for the Inductor CPU backend in torch.compile profiles multiple implementations of operations at compile time and selects the best-performing one. This is particularly beneficial for GEMM-related operations, using a C++ template-based GEMM implementation as an alternative to the ATen-based approach with oneDNN and MKL libraries. We support FP32, BF16, FP16, and INT8 with epilogue fusions for x86 CPUs. We’ve seen up to 7% geomean speedup on the dynamo benchmark suites and up to 20% boost in next-token latency for LLM inference.
123+
124+
For more information please refer to the [tutorial](https://pytorch.org/tutorials/prototype/max_autotune_on_CPU_tutorial.html).
125+
126+
127+
### [Prototype] TorchInductor CPU on Windows
128+
129+
Inductor CPU backend in torch.compile now works on Windows. We support MSVC (cl), clang (clang-cl) and Intel compiler (icx-cl) for Windows inductor currently.
130+
131+
See the [tutorial](https://pytorch.org/tutorials/prototype/inductor_windows_cpu.html) for more details.
132+
133+
134+
### [Prototype] FP16 support on CPU path for both eager mode and TorchInductor CPP backend
135+
136+
Float16 is a commonly used reduced floating point type for performance improvement in neural network inference/training. Since this release, float16 for both eager and TorchInductor is supported on the CPU path.
137+
138+
139+
### [Prototype] Autoload Device Extension
140+
141+
PyTorch now supports autoloading for out-of-tree device extensions, streamlining integration by eliminating the need for manual imports. This feature, enabled through the torch.backends entrypoint, simplifies usage by ensuring seamless extension loading, while allowing users to disable it via an environment variable if needed.
142+
143+
See the [tutorial](https://pytorch.org/tutorials/prototype/python_extension_autoload.html) for more information.
144+
145+
### [Prototype] Enhanced Intel GPU support
146+
147+
Intel GPUs support enhancement is now available for both Intel® Data Center GPU Max Series and Intel® Client GPUs (Intel® Core™ Ultra processors with built-in Intel® Arc™ graphics and Intel® Arc™ Graphics for dGPU parts), which is to make it easier to accelerate your Machine Learning workflows on Intel GPUs in PyTorch 2.5 release. We also enabled the initial support of PyTorch on Windows for Intel® Client GPUs in this release.
148+
149+
150+
151+
* Expanded PyTorch hardware backend support matrix to include both Intel Data Center and Client GPUs.  
152+
* The implementation of SYCL* kernels to enhance coverage and execution of Aten operators on Intel GPUs to boost performance in PyTorch eager mode.
153+
* Enhanced Intel GPU backend of torch.compile to improve inference and training performance for a wide range of deep learning workloads.
154+
155+
These features are available through PyTorch preview and nightly binary PIP wheels. For more information regarding Intel GPU support, please refer to [documentation](https://pytorch.org/docs/main/notes/get_start_xpu.html).
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
---
2+
layout: blog_detail
3+
title: "Intel GPU Support Now Available in PyTorch 2.5"
4+
author: By PyTorch Team at Intel
5+
---
6+
7+
Support for Intel GPUs is now available in PyTorch® 2.5, providing improved functionality and performance for Intel GPUs which including [Intel® Arc™ discrete graphics](https://www.intel.com/content/www/us/en/products/details/discrete-gpus/arc.html), [Intel® Core™ Ultra processors](https://www.intel.com/content/www/us/en/products/details/processors/core-ultra.html) with built-in Intel® Arc™ graphics and [Intel® Data Center GPU Max Series](https://www.intel.com/content/www/us/en/products/details/discrete-gpus/data-center-gpu/max-series.html). This integration brings Intel GPUs and the SYCL\* software stack into the official PyTorch stack, ensuring a consistent user experience and enabling more extensive AI application scenarios, particularly in the AI PC domain.
8+
9+
Developers and customers building for and using Intel GPUs will have a better user experience by directly obtaining continuous software support from native PyTorch, unified software distribution, and consistent product release time.
10+
11+
Furthermore, Intel GPU support provides more choices to users. Now PyTorch provides a consistent GPU programming paradigm on both front ends and back ends. Developers can now run and deploy workloads on Intel GPUs with minimal coding efforts.
12+
13+
## **Overview of Intel GPU support**
14+
15+
Intel GPU support in PyTorch provides eager mode and graph mode support in the PyTorch built-in front end. Eager mode now has an implementation of commonly used Aten operators with the SYCL programming language. Graph mode (torch.compile) now has an enabled Intel GPU back end to implement the optimization for Intel GPUs and to integrate Triton. 
16+
17+
Essential components of Intel GPU support were added to PyTorch, including runtime, Aten operators, oneDNN, TorchInductor, Triton and Intel GPU tool chains integration. Meanwhile, quantization and distributed are being actively developed in preparation for the PyTorch 2.6 release.
18+
19+
## **Features**
20+
21+
In addition to providing key features for Intel® Client GPUs and Intel® Data Center GPU Max Series for inference and training, PyTorch keeps the same user experience as other hardware the PyTorch supports. If you migrate code from CUDA\*, you can run the existing application code on an Intel GPU with minimal code changes for the device name (from cuda to xpu). For example:
22+
23+
*\# CUDA Code*
24+
**tensor** **\=** **torch.tensor(\[**1.0**,** 2.0**\]).to(**"cuda"**)**
25+
26+
*\# Code for Intel GPU*
27+
**tensor** **\=** **torch.tensor(\[**1.0**,** 2.0**\]).to(**"xpu"**)**
28+
29+
PyTorch 2.5 features with an Intel GPU include: 
30+
31+
* Inference and training workflows.
32+
* Enhance both torch.compile and eager mode functionalities (more Ops), together with performance improvement, and fully run three Dynamo Hugging Face\*, TIMM\* and TorchBench\* benchmarks for eager and compile modes. 
33+
* Data types such as FP32, BF16, FP16, and automatic mixed precision (AMP).
34+
* Runs on Intel® Client GPUs and Intel® Data Center GPU Max Series.
35+
* Supports Linux (Ubuntu, SUSE Linux and Red Hat Linux) and Windows 10/11.
36+
37+
## **Get Started**
38+
39+
Get a tour of the environment setup, PIP wheels installation, and examples on Intel® Client GPUs and Intel® Data Center GPU Max Series from [Getting Started Guide](https://pytorch.org/docs/main/notes/get_start_xpu.html). Support for Intel GPUs can be experienced through PyTorch PIP wheels installation by nightly and preview binary releases.
40+
41+
* Try Intel® Client GPUs through Intel® Arc™ Graphics family (Codename DG2), Intel® Core™ Ultra processor family with Intel® Graphics (Codename Meteor Lake), and Intel® Core™ Ultra mobile processor family with Intel® Graphics (Codename Lunar Lake).
42+
43+
* Try Intel Data Center GPU Max Series through [Intel® Tiber™ AI Cloud](https://cloud.intel.com/).
44+
45+
1. To learn how to create a free Standard account, see [Get Started](https://console.cloud.intel.com/docs/guides/get_started.html). Then do the following:
46+
47+
* Sign in to the [cloud console](https://console.cloud.intel.com/docs/guides/get_started.html).
48+
49+
* From the [Training](https://console.cloud.intel.com/training)** **section, open the  [PyTorch on Intel® GPUs](https://console.cloud.intel.com/training/detail/7db2a900-e47d-4b70-8968-cefa08432c1d)  notebook and click “Launch Jupyter Notebook.”
50+
51+
* Ensure that the **PyTorch 2.5** kernel is selected for the notebook.
52+
53+
## **Performance**
54+
55+
The performance of Intel GPU on PyTorch was continuously optimized to achieve decent result on three Dynamo Hugging Face, TIMM and TorchBench benchmarks for eager and compile modes.
56+
57+
The latest performance data measured on top of PyTorch Dynamo Benchmarking Suite using Intel® Data Center GPU Max Series 1100 single card showcase the FP16/BF16 significant speedup ratio over FP32 on eager mode in Figure 1, and Torch.compile mode speedup ratio over eager mode in Figure 2\. Both inference and training reached the similar significant improvements.
58+
59+
![Figure 2: FP16/BF16 Performance Gains Over FP32 Eager](/assets/images/performance-gains-over-fp32-eager.png){:style="width:100%"}
60+
61+
Figure 2: FP16/BF16 Performance Gains Over FP32 Eager
62+
63+
![Figure 3: Torch.compile Performance Gains Over Eager Mode](/assets/images/performance-gains-over-fp32-eager-2.png){:style="width:100%"}
64+
65+
Figure 3: Torch.compile Performance Gains Over Eager Mode
66+
67+
## **Summary**
68+
69+
Intel GPU on PyTorch 2.5 brings Intel® Client GPUs (Intel® Core™ Ultra processors with built-in Intel® Arc™ graphics and Intel® Arc™ Graphics for dGPU parts) and Intel® Data Center GPU Max Series into the PyTorch ecosystem for AI workload acceleration. Especially, Client GPUs is added to the GPU-supported list for AI PC use scenarios on Windows and Linux environment.
70+
71+
We warmly welcome the community to evaluate and provide feedback on these enhancements to  [Intel GPU support on PyTorch](https://github.com/pytorch/pytorch?tab=readme-ov-file#intel-gpu-support). 
72+
73+
## **Resources**
74+
75+
* [PyTorch Docs: Getting Started on Intel GPU](https://pytorch.org/docs/main/notes/get_start_xpu.html)
76+
* [Intel® Tiber™ AI Cloud](https://cloud.intel.com/)
77+
78+
## **Acknowledgments**
79+
80+
We want thank PyTorch open source community for their technical discussions and insights: [Andrey Talman](https://github.com/atalman)[Alban Desmaison](https://github.com/alband), [Nikita Shulga](https://github.com/malfet)[Eli Uriegas](https://github.com/seemethere), [Jason Ansel](https://github.com/jansel), and [Bin Bao](https://github.com/desertfire).
81+
82+
We also thank collaborators from PyTorch for their professional support and guidance.
83+
84+
## **Performance Configuration**
85+
86+
The configurations in the table are collected with [svr-info](https://github.com/intel/svr-info). Test by Intel on September 12, 2024\.
87+
88+
## Table 1
89+
90+
| Component | Details |
91+
| :---- | :---- |
92+
| **Name** | Intel® Max Series GPU 1100 in Intel® Tiber™ Developer Cloud |
93+
| **Time** | Thu Sep 12 08:21:27 UTC 2024 |
94+
| **System** | Supermicro SYS-521GE-TNRT |
95+
| **Baseboard** | Supermicro X13DEG-OA |
96+
| **Chassis** | Supermicro Other |
97+
| **CPU Model** | Intel(R) Xeon(R) Platinum 8468V |
98+
| **Microarchitecture** | SPR\_XCC |
99+
| **Sockets** | 2 |
100+
| **Cores per Socket** | 48 |
101+
| **Hyperthreading** | Enabled |
102+
| **CPUs** | 192 |
103+
| **Intel Turbo Boost** | Enabled |
104+
| **Base Frequency** | 2.4GHz |
105+
| **All-core Maximum Frequency** | 2.4GHz |
106+
| **Maximum Frequency** | 2.9GHz |
107+
| **NUMA Nodes** | 2 |
108+
| **Prefetchers** | L2 HW: Enabled, L2 Adj.: Enabled, DCU HW: Enabled, DCU IP: Enabled, AMP: Disabled, Homeless: Disabled, LLC: Disabled |
109+
| **PPINs** | 5e3f862ef7ba9d50, 6c85812edfcc84b1 |
110+
| **Accelerators** | DLB 2, DSA 2, IAA 2, QAT (on CPU) 2, QAT (on chipset) 0 |
111+
| **Installed Memory** | 1024GB (16x64GB DDR5 4800 MT/s \[4800 MT/s\]) |
112+
| **Hugepagesize** | 2048 kB |
113+
| **Transparent Huge Pages** | madvise |
114+
| **Automatic NUMA Balancing** | Enabled |
115+
| **NIC** | 2 x Ethernet Controller X710 for 10GBASE-T, 4 x MT2892 Family \[ConnectX-6 Dx\] |
116+
| **Disk** | 1 x 894.3G Micron\_7450\_MTFDKBG960TFR |
117+
| **BIOS** | 1.4a |
118+
| **Microcode** | 0x2b0004b1 |
119+
| **OS** | Ubuntu 22.04.2 LTS |
120+
| **Kernel** | 5.15.0-73-generic |
121+
| **TDP** | 330W |
122+
| **Power & Perf Policy** | Normal (6) |
123+
| **Frequency Governor** | performance |
124+
| **Frequency Driver** | acpi-cpufreq |
125+
| **Max C-State** | 9 |
126+
127+
## Table 2
128+
129+
| Component | Details |
130+
| :---- | :---- |
131+
| **Single Card** | Intel® Max Series GPU 1100 series on 4th Gen Intel® Xeon® processors of Intel Tiber Developer Cloud |
132+
| **Workload & version** | Timm ac34701, TorchBench 03cde49, Torchvision d23a6e1, Torchaudio b3f6f51, Transformers 243e186 |
133+
| **Software Stack** | intel-for-pytorch-gpu-dev 0.5.3, intel-pti-dev 0.9.0, Intel xpu backend for Triton cc981fe |
134+
| **Framework** | Pytorch 4a3dabd67f8ce63f2fc45f278421cca3cc532cfe |
135+
| **GPU driver** | agama-ci-devel-803.61 |
136+
| **GFX FW Version** | PVC2\_1.23374 |
137+
138+
**Notices & Disclaimers**
139+
140+
Performance varies by use, configuration and other factors. Learn more on the Performance Index site. Performance results are based on testing as of dates shown in configurations and may not reflect all publicly available updates.  See backup for configuration details.  No product or component can be absolutely secure. Your costs and results may vary. Intel technologies may require enabled hardware, software or service activation.
141+
142+
Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.
143+
144+
**AI disclaimer:**
145+
AI features may require software purchase, subscription or enablement by a software or platform provider, or may have specific configuration or compatibility requirements. Details at  [www.intel.com/AIPC](http://www.intel.com/AIPC). Results may vary.
Loading
Loading

0 commit comments

Comments
 (0)