[PATCH i-g-t v2 7/8] tests/intel/xe_exec_basic: add multigpu subtests

Kamil Konieczny kamil.konieczny at linux.intel.com
Thu Jan 25 13:44:23 UTC 2024


Hi Dominik,

On 2024-01-25 at 07:51:56 +0000, Piatkowski, Dominik Karol wrote:
> Hi Kamil,
> 
> > -----Original Message-----
> > From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Kamil
> > Konieczny
> > Sent: Wednesday, January 24, 2024 9:42 PM
> > To: igt-dev at lists.freedesktop.org
> > Subject: [PATCH i-g-t v2 7/8] tests/intel/xe_exec_basic: add multigpu subtests
> > 
> > Add a few multi-gpu subtests:
> > 
> > multigpu-once-*
> > multigpu-many-execqueues-many-vm-*
> > multigpu-no-exec-*
> > 
> > run on two or more GPUs. Many variant was limited to take at most few
> > seconds.
> > 
> > Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> > ---
> >  tests/intel/xe_exec_basic.c | 36
> > ++++++++++++++++++++++++++++++++++++
> >  1 file changed, 36 insertions(+)
> > 
> > diff --git a/tests/intel/xe_exec_basic.c b/tests/intel/xe_exec_basic.c index
> > 8994859fa..debffaaf3 100644
> > --- a/tests/intel/xe_exec_basic.c
> > +++ b/tests/intel/xe_exec_basic.c
> > @@ -11,6 +11,7 @@
> >   */
> > 
> >  #include "igt.h"
> > +#include "intel_multigpu.h"
> >  #include "lib/igt_syncobj.h"
> >  #include "lib/intel_reg.h"
> >  #include "xe_drm.h"
> > @@ -54,6 +55,18 @@
> >   * Description: Run no-exec %arg[1] test
> >   * Test category: functionality test
> >   *
> > + * SUBTEST: multigpu-once-%s
> > + * Description: Run %arg[1] test only once on multiGPU
> > + * Test category: functionality test
> > + *
> > + * SUBTEST: multigpu-many-execqueues-many-vm-%s
> > + * Description: Run %arg[1] test on many exec_queues and many VMs on
> > + multiGPU
> > + * Test category: stress test
> > + *
> > + * SUBTEST: multigpu-no-exec-%s
> > + * Description: Run no-exec %arg[1] test on multiGPU
> > + * Test category: functionality test
> > + *
> >   * arg[1]:
> >   *
> >   * @basic:				basic
> > @@ -369,4 +382,27 @@ igt_main
> > 
> >  	igt_fixture
> >  		drm_close_driver(fd);
> > +
> > +	for (const struct section *s = sections; s->name; s++) {
> > +		igt_subtest_f("multigpu-once-%s", s->name) {
> > +			xe_multi_fork_foreach_gpu(xe, gpu_idx)
> > +				xe_for_each_engine(xe, hwe)
> > +					test_exec(xe, hwe, 1, 1, 1, s->flags);
> 
> Nitpick: consider using fd instead of xe for consistency

Macro defines a var with that name so it rather should be different,
for example could be gpu_fd.

Regards,
Kamil

> Otherwise, LGTM
> Reviewed-by: Dominik Karol Piątkowski <dominik.karol.piatkowski at intel.com>
> 
> > +			igt_waitchildren();
> > +		}
> > +
> > +		igt_subtest_f("multigpu-many-execqueues-many-vm-%s", s-
> > >name) {
> > +			xe_multi_fork_foreach_gpu(xe, gpu_idx)
> > +				xe_for_each_engine(fd, hwe)
> > +					test_exec(fd, hwe, 16, 32, 16, s-
> > >flags);
> > +			igt_waitchildren();
> > +		}
> > +
> > +		igt_subtest_f("multigpu-no-exec-%s", s->name) {
> > +			xe_multi_fork_foreach_gpu(xe, gpu_idx)
> > +				xe_for_each_engine(fd, hwe)
> > +					test_exec(fd, hwe, 1, 0, 1, s->flags);
> > +			igt_waitchildren();
> > +		}
> > +	}
> >  }
> > --
> > 2.42.0
> 


More information about the igt-dev mailing list