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

Nirmoy Das nirmoy.das at intel.com
Wed Feb 28 16:21:18 UTC 2024


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 */
+			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)
+					test_compute_preempt(xe, hwe);
+				igt_waitchildren();
+			}
+		}
+	}
+
 	igt_fixture
 		drm_close_driver(xe);
 
-- 
2.42.0



More information about the igt-dev mailing list