[PATCH i-g-t v2] tests/intel/xe_compute_preempt: Add compute-preempt-many

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Thu Feb 29 07:14:27 UTC 2024


On Wed, Feb 28, 2024 at 05:21:18PM +0100, Nirmoy Das wrote:
> Add compute-preempt-many which should exercise multiple
> mid-thread preemption at a time for multiple contexts.
> 
> v2: move igt_fork within the test(Zbigniew).
> 
> Cc: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
> Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
> ---
>  tests/intel/xe_compute_preempt.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/tests/intel/xe_compute_preempt.c b/tests/intel/xe_compute_preempt.c
> index a4e0e1454..0aeb10547 100644
> --- a/tests/intel/xe_compute_preempt.c
> +++ b/tests/intel/xe_compute_preempt.c
> @@ -22,6 +22,11 @@
>   * Description:
>   *      Exercise compute walker mid thread preemption scenario
>   * Functionality: compute openCL kernel
> + * SUBTEST: compute-preempt-many
> + * GPU requirement: LNL
> + * Description:
> + *      Exercise multiple walker mid thread preemption scenario
> + * Functionality: compute openCL kernel
>   */
>  static void
>  test_compute_preempt(int fd, struct drm_xe_engine_class_instance *hwe)
> @@ -48,6 +53,20 @@ igt_main
>  		}
>  	}
>  
> +	igt_subtest_with_dynamic("compute-preempt-many") {
> +		xe_for_each_engine(xe, hwe) {
> +			/* TODO: This subtest fails on RCS engine */

Hmm, aren't compute engines separated from render engines now?

> +			if (hwe->engine_class != DRM_XE_ENGINE_CLASS_COMPUTE)
> +				continue;
> +
> +			igt_dynamic_f("engine-%s", xe_engine_class_string(hwe->engine_class)) {
> +				igt_fork(child, 100)

I'm curious - why arbitrary number 100 was taken? Regardless
answer code looks good to me, so:

Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>

--
Zbigniew

> +					test_compute_preempt(xe, hwe);
> +				igt_waitchildren();
> +			}
> +		}
> +	}
> +
>  	igt_fixture
>  		drm_close_driver(xe);
>  
> -- 
> 2.42.0
> 


More information about the igt-dev mailing list