[igt-dev] [PATCH i-g-t 0/5] introduce gem_multigpu and other multi-GPU helpers

Kamil Konieczny kamil.konieczny at linux.intel.com
Fri Oct 13 18:57:27 UTC 2023


Add some multi-gpu function helpers and macros. One thing
that allows it to use  __drm_open_driver_another(2, ...)
is that in macros, before calling multi_fork() it opens all
devices in-order, one after another. The drawback is somewhat
time consuming work before test begins and it also do not
print in logs <g:gpu-number> for opening devices.

Sample runs when first device is non-Intel, first one
without filters:

sudo build/tests/xe_create --r multigpu-create-massive-size

Opened device: /dev/dri/card1
Starting subtest: multigpu-create-massive-size
Opened device: /dev/dri/card2
Opened device: /dev/dri/card3
Subtest multigpu-create-massive-size: SUCCESS (4.302s)

Second one with filters:

sudo IGT_DEVICE=pci:vendor=Intel,device=discrete,card=all build/tests/xe_create --r multigpu-create-massive-size

Opened device: /dev/dri/card1
Starting subtest: multigpu-create-massive-size
Opened device: /dev/dri/card2
Opened device: /dev/dri/card3
Subtest multigpu-create-massive-size: SUCCESS (3.824s)

Cc: Chris Wilson <chris.p.wilson at linux.intel.com>
Cc: Dominik Karol Piątkowski <dominik.karol.piatkowski at intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>

Dominik Karol Piątkowski (4):
  lib/igt_device_scan: Introduce filtering out non-PCI devices
  lib/i915/gem_multigpu: Introduce library for multi-GPU scenarios
  lib/drmtest: Introduced drm_open_driver_another
  lib/i915/gem_multigpu: Introduced gem_multigpu_count_class and
    igt_multi_fork_foreach_gpu

Kamil Konieczny (1):
  RFC: tests/intel/xe_create: example for useing macro for multi-gpu
    testing

 lib/drmtest.c           | 19 +++++++++++++++++++
 lib/drmtest.h           |  1 +
 lib/i915/gem_multigpu.c | 39 +++++++++++++++++++++++++++++++++++++++
 lib/i915/gem_multigpu.h | 27 +++++++++++++++++++++++++++
 lib/igt_device_scan.c   | 21 +++++++++++++++++++++
 lib/igt_device_scan.h   |  2 ++
 lib/meson.build         |  1 +
 tests/intel/xe_create.c | 20 ++++++++++++++++++++
 8 files changed, 130 insertions(+)
 create mode 100644 lib/i915/gem_multigpu.c
 create mode 100644 lib/i915/gem_multigpu.h

-- 
2.42.0



More information about the igt-dev mailing list