rusticl llvmpipe backend is not available when GALLIUM_DRIVER="d3d12" is set
System information
System:
Host: USNYGRPC15944 Kernel: 6.1.21.2-microsoft-standard-WSL2+ x86_64
bits: 64 compiler: gcc v: 11.4.0 Desktop: N/A dm: N/A
Distro: Ubuntu 22.04.3 LTS (Jammy Jellyfish)
CPU:
Info: 8-core model: Intel Core i9-9880H bits: 64 type: MT MCP
arch: Coffee Lake rev: D cache: L1: 512 KiB L2: 2 MiB L3: 16 MiB
Speed (MHz): avg: 2304 min/max: N/A cores: 1: 2304 2: 2304 3: 2304
4: 2304 5: 2304 6: 2304 7: 2304 8: 2304 9: 2304 10: 2304 11: 2304 12: 2304
13: 2304 14: 2304 15: 2304 16: 2304 bogomips: 73728
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3
Graphics:
Device-1: Microsoft driver: dxgkrnl v: 2.0.1 bus-ID: 8b32:00:00.0
chip-ID: 1414:008e
Device-2: Microsoft driver: dxgkrnl v: 2.0.1 bus-ID: cf01:00:00.0
chip-ID: 1414:008e
Display: wayland server: X.org v: 1.21.1.4 with: Xwayland v: 22.1.1
driver: gpu: dxgkrnl,dxgkrnl display-ID: :0 screens: 1
Screen-1: 0 s-res: 3840x1080 s-dpi: 96
Monitor-1: XWAYLAND0 pos: primary,left res: 1920x1080 size: N/A
Monitor-2: XWAYLAND1 pos: right res: 1920x1080 dpi: 93
diag: 604mm (23.8")
OpenGL: renderer: D3D12 (NVIDIA Quadro RTX 3000) v: 4.2 Mesa
24.0~git2310260600.d446cc~oibaf~j (git-d446ccf 2023-10-26 jammy-oibaf-ppa)
compat-v: 4.2 direct render: Yes
Describe the issue
If GALLIUM_DRIVER="d3d12" is set in the environment (for example, inside a WSL2 instance under Windows 10), then the llvmpipe backend for rusticl stops being available.
Output of
GALLIUM_DRIVER="d3d12" RUSTICL_ENABLE="llvmpipe" clinfo
is:
Number of platforms 2
Platform Name rusticl
Platform Vendor Mesa/X.org
Platform Version OpenCL 3.0
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_byte_addressable_store cl_khr_create_command_queue cl_khr_expect_assume cl_khr_extended_versioning cl_khr_icd cl_khr_il_program cl_khr_spirv_no_integer_wrap_decoration
Platform Extensions with Version cl_khr_byte_addressable_store 0x400000 (1.0.0)
cl_khr_create_command_queue 0x400000 (1.0.0)
cl_khr_expect_assume 0x400000 (1.0.0)
cl_khr_extended_versioning 0x400000 (1.0.0)
cl_khr_icd 0x400000 (1.0.0)
cl_khr_il_program 0x400000 (1.0.0)
cl_khr_spirv_no_integer_wrap_decoration 0x400000 (1.0.0)
Platform Numeric Version 0xc00000 (3.0.0)
Platform Extensions function suffix MESA
Platform Host timer resolution 1ns
Platform Name Clover
Platform Vendor Mesa
Platform Version OpenCL 1.1 Mesa 24.0~git2310260600.d446cc~oibaf~j (git-d446ccf 2023-10-26 jammy-oibaf-ppa)
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions function suffix MESA
Platform Name rusticl
Number of devices 0
Platform Name Clover
Number of devices 0
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) rusticl
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) <error: 0 devices, multiple matching platforms!>
clCreateContext(NULL, ...) [default] No devices found in platform
clCreateContext(NULL, ...) [other]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) No devices found in platform
ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.2.14
ICD loader Profile OpenCL 3.0
Output with:
RUSTICL_ENABLE="llvmpipe" clinfo
results in:
Number of platforms 2
Platform Name rusticl
Platform Vendor Mesa/X.org
Platform Version OpenCL 3.0
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_byte_addressable_store cl_khr_create_command_queue cl_khr_expect_assume cl_khr_extended_versioning cl_khr_icd cl_khr_il_program cl_khr_spirv_no_integer_wrap_decoration
Platform Extensions with Version cl_khr_byte_addressable_store 0x400000 (1.0.0)
cl_khr_create_command_queue 0x400000 (1.0.0)
cl_khr_expect_assume 0x400000 (1.0.0)
cl_khr_extended_versioning 0x400000 (1.0.0)
cl_khr_icd 0x400000 (1.0.0)
cl_khr_il_program 0x400000 (1.0.0)
cl_khr_spirv_no_integer_wrap_decoration 0x400000 (1.0.0)
Platform Numeric Version 0xc00000 (3.0.0)
Platform Extensions function suffix MESA
Platform Host timer resolution 1ns
Platform Name Clover
Platform Vendor Mesa
Platform Version OpenCL 1.1 Mesa 24.0~git2310260600.d446cc~oibaf~j (git-d446ccf 2023-10-26 jammy-oibaf-ppa)
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions function suffix MESA
Platform Name rusticl
Number of devices 1
Device Name llvmpipe (LLVM 15.0.7, 256 bits)
Device Vendor Mesa
Device Vendor ID 0
Device Version OpenCL 3.0
Device UUID 6d657361-3234-2e30-7e67-697432333100
Driver UUID 6c6c766d-7069-7065-5555-494400000000
Valid Device LUID No
Device LUID 0000-000000000000
Device Node Mask 0
Device Numeric Version 0xc00000 (3.0.0)
Driver Version 24.0~git2310260600.d446cc~oibaf~j (git-d446ccf 2023-10-26 jammy-oibaf-ppa)
(Output trimmed not far after showing that rusticl is offering the llvmpipe backend here).
This leaves a WSL2 system without any functioning OpenCL solution since: dzn is, according to its developers not mature enough for the recent Rusticl-on-Zink implementation Even if it were, Rusticl-on-zink appears to be unable to use a Vulkan implementation that is a translation layer (as it appears to treat translation layers identically to CPU implementations)
Edited by Andrew Dodd