Experimenting with PyTorch on Intel architecture
| .gitignore | ||
| amp-inference.py | ||
| env.sh | ||
| fp32-inference.py | ||
| main.py | ||
| README.md | ||
| torch-compile-inference.py | ||
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), you can should have access to conda and be able to import torch normally.
Setup
- Run
env.shto activate the conda environment and set
$ . 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()