llvm-project
0434d8f1 - [offload][sycl] Introduce `DRIVER_ID` device property (#217562)

Commit
57 days ago
[offload][sycl] Introduce `DRIVER_ID` device property (#217562) Prior to the introduction of liboffload contexts, Level Zero devices under different driver instances used to each receive their own `L0ContextTy`s. https://github.com/llvm/llvm-project/pull/209144 introduced contexts, which are designed to map to a single `ze_context` on L0. `olCreateContext` accepts a user-defined device list and is restricted to accept devices within a single platform. This restriction is insufficient for L0 - passing devices from different driver instances is allowed under this contract, but does not make sense on L0 as `zeContextCreate` needs a concrete driver instance as a parameter. Introduce a `DRIVER_ID` device property. On CUDA and AMD, it is always equal to 0. On L0, it is a distinct integer for each driver instance. A set of devices can be used to create a context if and only if they all belong to the same platform and have the same DRIVER_ID. Change libsycl to create separate logical SYCL platforms (which share their ol_platform_handle_t) for each possible liboffload (platform, driverId) pair. Assisted-by: Codex (5.6 Sol)
Author
Parents
Loading