Commit 1e56d0e9 authored by 98440's avatar 98440
Browse files

add start intel XPU

parent 4bbd328d
Loading
Loading
Loading
Loading

doc/start_intel_xpu.md

0 → 100644
+20 −0
Original line number Diff line number Diff line

---
## 官方支持文档

https://pytorch.org/docs/main/notes/get_start_xpu.html

## 需要安装

`Intel® Deep Learning Essentials`
`Intel® oneAPI Base Toolkit`

`2025.0.1`版本已经过验证

## 启动
``` 
"C:\Program Files (x86)\Intel\oneAPI\compiler\2025.0\env\vars.bat"
"C:\Program Files (x86)\Intel\oneAPI\ocloc\2025.0\env\vars.bat"

python launch.py
```
+5 −0
Original line number Diff line number Diff line
@@ -175,6 +175,11 @@ def is_nvidia():
            return True
    return False

def is_intel():
    if DEFAULT_DEVICE == 'xpu':
        if torch.version.xpu:
            return True
    return False

def soft_empty_cache():
    gc.collect()