uxlfoundation / oneAPI-spec

oneAPI Specification source files
https://spec.oneapi.com
Other
190 stars 110 forks source link

Intel(R) Arc(TM) A770M Setting as default instead of Iris Xe Graphics #536

Open shailesh837 opened 6 months ago

shailesh837 commented 6 months ago

Please can you help how can i set Intel(R) Arc(TM) A770M as default that sycl-ls instead of Device Name: Intel(R) Iris(R) Xe Graphics As llama-cpp is detecting Xe Graphics and running inference there instead of Intel Arc GPU ?

dg2@dg2-demo:~/Desktop/anna$ oneapi-cli version
devel
dg2@dg2-demo:~/Desktop/anna$ sycl-ls
[opencl:acc:0] Intel(R) FPGA Emulation Platform for OpenCL(TM), Intel(R) FPGA Emulation Device OpenCL 1.2  [2023.16.12.0.12_195853.xmain-hotfix]
[opencl:cpu:1] Intel(R) OpenCL, 12th Gen Intel(R) Core(TM) i7-12700H OpenCL 3.0 (Build 0) [2023.16.12.0.12_195853.xmain-hotfix]
[opencl:gpu:2] Intel(R) OpenCL Graphics, Intel(R) Arc(TM) A770M Graphics OpenCL 3.0 NEO  [23.52.28202.51]
[opencl:gpu:3] Intel(R) OpenCL Graphics, Intel(R) Iris(R) Xe Graphics OpenCL 3.0 NEO  [23.52.28202.51]
[ext_oneapi_level_zero:gpu:0] Intel(R) Level-Zero, Intel(R) Arc(TM) A770M Graphics 1.3 [1.3.28202]
[ext_oneapi_level_zero:gpu:1] Intel(R) Level-Zero, Intel(R) Iris(R) Xe Graphics 1.3 [1.3.28202]
dg2@dg2-demo:~/Desktop/anna$ sudo xpu-smi discovery
+-----------+--------------------------------------------------------------------------------------+
| Device ID | Device Information                                                                   |
+-----------+--------------------------------------------------------------------------------------+
| 0         | Device Name: Intel(R) Iris(R) Xe Graphics                                          |
|           | Vendor Name: Intel(R) Corporation                                                    |
|           | SOC UUID: 00000000-0000-0200-0000-000c46a68086                                       |
|           | PCI BDF Address: 0000:00:02.0                                                        |
|           | DRM Device: /dev/dri/card0                                                           |
|           | Function Type: physical                                                              |
+-----------+--------------------------------------------------------------------------------------+
| 1         | Device Name: Intel(R) Arc(TM) A770M Graphics                                         |
|           | Vendor Name: Intel(R) Corporation                                                    |
|           | SOC UUID: 00000000-0000-0003-0000-000856908086                                       |
|           | PCI BDF Address: 0000:03:00.0                                                        |
|           | DRM Device: /dev/dri/card1                                                           |
|           | Function Type: physical                                                              |
+-----------+--------------------------------------------------------------------------------------+
tonym97 commented 6 months ago

Just double checking. Are you asking to always change the default or just for an individual run? For the latter you can set the ONEAPI_DEVICE_SELECTOR variable to something. Normally GPUs are used in order based on what’s in sycl-ls but try the environment variable if that’s not working for you.