You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, verify that the XPU device is available to Intel® Extension for PyTorch\*:
75
+
69
76
```bash
70
-
python -c "import intel_extension_for_pytorch as ipex;print(ipex.xpu.is_available())"
77
+
python -c "import torch;import intel_extension_for_pytorch as ipex;print(torch.xpu.has_xpu())"
71
78
```
79
+
72
80
Sample output looks like below:
73
-
```
81
+
82
+
```bash
74
83
True
75
84
```
85
+
76
86
Use the following command to check whether MKL is enabled as default:
87
+
77
88
```bash
78
-
python -c "import intel_extension_for_pytorch as ipex;print(ipex.xpu.has_onemkl())"
89
+
python -c "import torch;import intel_extension_for_pytorch as ipex;print(torch.xpu.has_onemkl())"
79
90
```
91
+
80
92
Sample output looks like below:
81
-
```
93
+
94
+
```bash
82
95
True
83
96
```
97
+
84
98
Finally, use the following command to show detailed info of detected device:
99
+
85
100
```bash
86
-
python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch.__version__); print(ipex.__version__); [print(f'[{i}]: {ipex.xpu.get_device_properties(i)}') for i in range(ipex.xpu.device_count())];"
101
+
python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch.__version__); print(ipex.__version__); [print(f'[{i}]: {torch.xpu.get_device_properties(i)}') for i in range(torch.xpu.device_count())];"
87
102
```
88
103
89
104
Sample output looks like below:
105
+
106
+
```bash
107
+
2.3.1+cxx11.abi
108
+
2.3.110+xpu
109
+
[0]: _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', type='gpu', driver_version='1.3.30049', total_memory=65536MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
110
+
[1]: _XpuDeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', type='gpu', driver_version='1.3.30049', total_memory=65536MB, max_compute_units=448, gpu_eu_count=448, gpu_subslice_count=56, max_work_group_size=1024, max_num_sub_groups=64, sub_group_sizes=[16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
90
111
```
91
-
2.1.0.post2+cxx11.abi
92
-
2.1.30+xpu
93
-
[0]: _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu', driver_version='1.3.27642', has_fp64=1, total_memory=65536MB, max_compute_units=448, gpu_eu_count=448)
94
-
[1]: _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu', driver_version='1.3.27642', has_fp64=1, total_memory=65536MB, max_compute_units=448, gpu_eu_count=448)
95
-
```
112
+
96
113
#### Running your own script
97
114
98
115
Now you are inside container with Python 3.10, PyTorch, and Intel® Extension for PyTorch\* preinstalled. You can run your own script
0 commit comments