[igt-dev] [RFC i-g-t v2 0/3] Add multi-process subtests for multi-GPUs

Mauro Carvalho Chehab mauro.chehab at linux.intel.com
Tue Oct 11 07:45:05 UTC 2022


On Fri,  7 Oct 2022 20:48:58 +0200
Kamil Konieczny <kamil.konieczny at linux.intel.com> wrote:

> Add one simple macro igt_fork_dyn() and two new helpers in
> igt_core to enable running dynamic tests on two or more GPUs in
> parallel.
> To test this idea I modified two subtests gem_basic at create-close
> and gem_exec_gttfill at basic.
> It is open-coded for ease of debug but can be converted
> into macro if this idea will get acceptance.
> 
> Todo: add some log extension to igt_core from Mauro:
>   https://patchwork.freedesktop.org/series/109171/
>   "add sysfs node at subtest results when available"
> 
> See some logs below.
> 
> Cc: Anna Karas <anna.karas at intel.com>
> Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> Cc: Mauro Carvalho Chehab <mauro.chehab at linux.intel.com>
> Cc: Petri Latvala <petri.latvala at intel.com>
> 
> This is log from gem_exec_gttfill run on one GPU machine:
> 
> IGT-Version: 1.26-NO-GIT (x86_64) (Linux: 6.0.0-rc5-CI_DRM_12145-g2dc9ea03abff x86_64)
> Starting subtest: basic
> Starting dynamic subtest: basic-gpu-0
> Starting dynamic subtest: basic-gpu-1
> Test requirement not met in function start_helpers, file ../tests/i915/gem_exec_gttfill.c:229:
> Test requirement: i915 > 0
> Last errno: 2, No such file or directory
> Dynamic subtest basic-gpu-1: SKIP (0.025s)
> Setup 1025 batches in 1051.24ms
> engine[2]: 2 cycles
> engine[1]: 1 cycles
> engine[0]: 3 cycles
> engine[3]: 2 cycles
> engine[4]: 2 cycles
> Total: 10 cycles
> Dynamic subtest basic-gpu-0: SUCCESS (2.960s)
> Subtest basic: SUCCESS (2.967s)
> 
> Result from machine with two discrete GPUs:
> 
> Starting subtest: basic
> Starting dynamic subtest: basic-gpu-0
> Starting dynamic subtest: basic-gpu-1
> Setup 1025 batches in 3518.56ms
> Setup 1025 batches in 3494.03ms
> ...
> Dynamic subtest basic-gpu-0: SUCCESS (35.349s)
> Dynamic subtest basic-gpu-1: SUCCESS (35.374s)
> Subtest basic: SUCCESS (35.401s)

Yeah, it sounded a good idea to use dynamic subtests here.

The all-success case is the less complex one. I'd love to see
if skip and fail will be properly handled.

IMO, you could add an unit test, similar to lib/tests/igt_fork.c, that 
would pretend that there would be (at least) 3 GPUs, in order to test
if the error would work whith a mix of different subtest results
(fail, skip, success).

Also, instead of using:

	igt_dynamic_f("%s-gpu-%d", myname, child)

it probably makes sense to name them after the PCI ID and
PCI BUS - e. g. something captured from the sysfs node, as I proposed
on my RFC patch https://patchwork.freedesktop.org/series/109171/.

Regards,
Mauro


More information about the igt-dev mailing list