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

Nirmoy Das nirmoy.das at intel.com
Thu Feb 29 11:08:37 UTC 2024


On 2/29/2024 8:14 AM, Zbigniew Kempczyński wrote:
> 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?

Yes. I was thinking of running the test on both compute and render 
engines. But the job gets timed out on render engine when I use

more jobs. Playing around with timeslice value helps but not completely.

>
>> +			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?

I have picked a bit good looking, high enough random number. Long 
running workload duration will depend

on the HW it running on so ideally I think It should be measured 1st and 
then find number of parallel workloads that fits within a jobtimeout value.


>   Regardless
> answer code looks good to me, so:
>
> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>

Thanks,

Nirmoy

>
> --
> 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