compute-runtime icon indicating copy to clipboard operation
compute-runtime copied to clipboard

Easiest way to evaluate L0 P2P functionality?

Open manuelmohr opened this issue 8 months ago • 1 comments

I'm interested in evaluating the P2P functionality in the Level Zero API for multi-GPU setups and I'm wondering which hardware configurations would allow me to do that.

Is there some kind of compatibility matrix or documentation somewhere that tells me under which circumstances (combination of devices, driver version, etc.) P2P functionality is available? For example, if I have a system with an integrated Intel GPU and a dedicated Intel GPU, can I get these to show up as two Level Zero devices that allow peer-to-peer access? If not, what setup would I need?

manuelmohr avatar May 06 '25 07:05 manuelmohr

I don't really have a clue on this, but my first guess was it referring to PVC XeLink capabilities.

However, API doc does mention also Host<->Device P2P, which would indicate that it's not limited just to XeLink: https://oneapi-src.github.io/level-zero-spec/level-zero/latest/core/PROG.html#peer-to-peer-access-and-queries

And it does also mention "A device/subdevice is always its own peer, i.e. it can always access itself and also do so atomically", which should cover devices with multiple GPUs, or supporting SR-IOV / VFs.

SR-IOV is supported Intel Data Center GPUs and newer iGPUs: https://www.intel.com/content/www/us/en/support/articles/000093216/graphics/processor-graphics.html

SO I guess minimum setup to test it would be with SR-IOV on iGPU?

eero-t avatar Jun 30 '25 09:06 eero-t

Hi @manuelmohr,

The most reliable way to determine peer-to-peer (P2P) capability in your setup is to query the dedicated Level Zero API. Refer to the oneAPI Level Zero Specification, specifically the sections on zeDeviceCanAccessPeer and zeDeviceGetP2PProperties, for details on how to fetch this information.

In terms of hardware support overview:

  • Integrated (iGPU) vs Discrete (dGPU) GPUs: Both iGPU and dGPU typically appear as separate Level Zero devices. However, P2P access between iGPU and dGPU is not supported due to architectural and driver limitations. If you query P2P capability between these device types using zeDeviceCanAccessPeer, the API will report that peer access is unavailable.
  • Recommended setup for P2P: For P2P functionality, use two or more discrete Intel GPUs of the same generation and family, connected via PCIe and running recent drivers. This configuration is most likely to support P2P access. Always verify support programmatically for your specific devices using zeDeviceCanAccessPeer.

To sum up:

  • For P2P with Level Zero, use two or more discrete Intel GPUs of the same generation on the same PCIe root, with up-to-date drivers.
  • P2P between iGPU and dGPU is not supported.
  • Always check P2P capability for your specific setup using the Level Zero API.

Table:

GPU Combination P2P Supported Notes
dGPU + dGPU (same gen) Yes *If on same PCIe root, recent driver
dGPU + dGPU (diff gen) No Not supported
iGPU + dGPU no Not supported

kgibala avatar Dec 17 '25 11:12 kgibala