29 lines
810 B
Markdown
29 lines
810 B
Markdown
# Learn PyTorch
|
|
|
|
Code experimenting with PyTorch using Intel architecture (i.e., Intel Core Ultra processor with iGPU) or `xpu`.
|
|
|
|
After installing `ipex-llm` which is required to use Intel GPUs (see documentation in [Links](#Links)), you can should have access to `conda` and be able to `import torch` normally.
|
|
|
|
## Setup
|
|
|
|
1. Run `env.sh` to activate the conda environment and set
|
|
|
|
```bash
|
|
$ . env.sh
|
|
```
|
|
|
|
2. (Optional) Confirm if XPU is detected
|
|
|
|
```bash
|
|
$ python # go intou the python shell
|
|
|
|
$ import torch
|
|
$ torch.xpu.is_available()
|
|
$ torch.xpu.get_device_name()
|
|
|
|
```
|
|
|
|
## Links
|
|
|
|
- [Install IPEX-LLM on Intel GPU with PyTorch 2.6](https://git.ayo.run/ayo/ipex-llm/src/branch/main/docs/mddocs/Quickstart/install_pytorch26_gpu.md)
|
|
- [Get started with PyTorch locally](https://pytorch.org/get-started/locally/)
|