Experimenting with PyTorch on Intel architecture
| inference-examples | ||
| .gitignore | ||
| 01-tensors.py | ||
| check-xpu.py | ||
| env.sh | ||
| README.md | ||
Learn PyTorch
Important
Steps here to run PyTorch locally are specific to machines with Intel XPUs.
Experimenting with PyTorch using Intel architecture (i.e., Intel Core Ultra processor with iGPU).
After installing ipex-llm which is required to use Intel GPUs (see Setup), you will have access to conda and be able to import torch normally.
The XPU is an accelerator for working with Tensors.
Setup
$ git clone https://git.ayo.run/ayo/learn-pytorch
- Run
env.shto activate the conda environment and set
$ cd learn-python
$ . env.sh
- (Optional) Confirm if XPU is detected
$ python # go intou the python shell
$ import torch
$ torch.xpu.is_available()
$ torch.xpu.get_device_name()