You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4. Build Triton as above, but set the following environment variables.
125
-
126
-
# Modify as appropriate to point to your LLVM build.
127
-
$ export LLVM_BUILD_DIR=$HOME/llvm-project/build
128
-
129
-
$ cd <triton install>
130
-
$ LLVM_INCLUDE_DIRS=$LLVM_BUILD_DIR/include \
131
-
LLVM_LIBRARY_DIR=$LLVM_BUILD_DIR/lib \
132
-
LLVM_SYSPATH=$LLVM_BUILD_DIR \
133
-
pip install -e python
114
+
```shell
115
+
./scripts/compile-triton.sh --llvm --triton
116
+
```
134
117
135
118
# Tips for building
136
119
@@ -223,11 +206,13 @@ For detailed instructions on how to debug Triton's frontend, please refer to thi
223
206
# Usage Guide
224
207
225
208
## Code Modifications
226
-
Intel® XPU Backend for Triton\*doesn't require any modifications and will work with PyTorch 2.4 release out of the box.
209
+
Intel® XPU Backend for Triton\* requires a special version of PyTorch that can be built from sources or installed from nightly wheels.
227
210
228
211
1. Add `import torch` for xpu support.
229
212
2. Put the tensor and models to XPU by calling `to('xpu')`.
230
213
214
+
This repository contains modified [tutorials](python/tutorials) that must be used with Intel® XPU Backend for Triton\*.
215
+
231
216
The following examples show modifications for the user code.
232
217
233
218
### Example 1 : Triton Kernel
@@ -285,11 +270,9 @@ print(
285
270
)
286
271
```
287
272
288
-
289
273
### Example 2 : End-to-End Model
290
274
Triton is transparent for end-to-end models. One could easily use `torch.compile` with `inductor` as backend by default. It will automatically generates triton kernel and gets benefit from it.
If you wish to take a look at more examples, please refer to the [Unit Tests](docs/test_docs/unit_tests.md) and [End-to-End Benchmark Tests](docs/test_docs/end_to_end_tests.md).
319
-
320
-
321
300
## Performance Analysis Guide
322
301
323
302
There are several ways of doing performance analysis. We recommend using `torch.profiler` for end-to-end performance analysis and using Intel® VTune™ Profiler for more detailed kernel analysis. We provide a comprehensive guide for those two:
@@ -330,30 +309,10 @@ Note that the user needs to explicitly set `TRITON_XPU_PROFILE=1` when the user
330
309
export TRITON_XPU_PROFILE=1
331
310
```
332
311
333
-
# Changelog
334
-
335
-
Version 2.2 is out! New features include:
336
-
- Many, many bug fixes
337
-
- Performance improvements for Intel GPU Max series
338
-
- Support for kernels that contain back-to-back matmuls (e.g., flash attention)
339
-
340
312
# Contributing
341
313
342
314
Community contributions are more than welcome, whether it be to fix bugs or to add new features at [github](https://github.com/intel/intel-xpu-backend-for-triton). For more detailed instructions, please visit our [contributor's guide](CONTRIBUTING.md).
343
315
344
-
345
-
# Compatibility
346
-
347
-
Supported Platforms:
348
-
* Linux
349
-
* WSL2
350
-
351
-
Supported Hardware:
352
-
* NVIDIA GPUs (Compute Capability 7.0+)
353
-
* AMD GPUs (ROCm 5.2+)
354
-
* Intel GPU Max 1100/1550, Intel Flex, Intel Arc A770
355
-
* Under development: CPUs
356
-
357
316
## License
358
317
359
318
_MIT License_. As found in [LICENSE](https://github.com/intel/intel-xpu-backend-for-triton/blob/main/LICENSE) file.
0 commit comments