Commit 11fe3d9
committed
Enable training on XPU using SingleXPUStrategy
Setting the SingleXPUStrategy fixes the error message,
```
Failed to train pending training job: Device should be xpu, got cpu
instead
```
After this another error would show up,
```
Cannot re-initialize XPU in forked subproces. To use XPU with
multiprocessing you must use the `spawn` method
```
This requires us to set the start method of our `main.py` file.
Signed-off-by: Mark Redeman <[email protected]>1 parent c0af0a0 commit 11fe3d9
2 files changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 | | |
5 | 10 | | |
6 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
| 218 | + | |
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
| |||
0 commit comments