Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: janga.rahul.kumar@intel.com
To: igt-dev@lists.freedesktop.org, ramadevi.gandi@intel.com,
	janga.rahul.kumar@intel.com, nirmoy.das@intel.com
Subject: [PATCH i-g-t 3/3] tests/intel/xe_compute_preempt: Add compute preempt test
Date: Thu, 28 Dec 2023 05:45:10 +0530	[thread overview]
Message-ID: <20231228001510.1399329-4-janga.rahul.kumar@intel.com> (raw)
In-Reply-To: <20231228001510.1399329-1-janga.rahul.kumar@intel.com>

From: Janga Rahul Kumar <janga.rahul.kumar@intel.com>

Test submits long and short opencl kernels to exercise
preemption scenario.

Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
---
 tests/intel/xe_compute_preempt.c | 46 ++++++++++++++++++++++++++++++++
 tests/meson.build                |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 tests/intel/xe_compute_preempt.c

diff --git a/tests/intel/xe_compute_preempt.c b/tests/intel/xe_compute_preempt.c
new file mode 100644
index 000000000..fdf817d12
--- /dev/null
+++ b/tests/intel/xe_compute_preempt.c
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2022 Intel Corporation
+ */
+
+/**
+ * TEST: Check compute-related preemption functionality
+ * Category: Hardware building block
+ * Sub-category: compute
+ * Test category: functionality test
+ */
+
+#include <string.h>
+
+#include "igt.h"
+#include "intel_compute.h"
+#include "xe/xe_query.h"
+
+/**
+ * SUBTEST: compute-preempt
+ * GPU requirement: LNL
+ * Description:
+ *      Exercise preemption scenario
+ * Functionality: compute openCL kernel
+ */
+static void
+test_compute_preempt(int fd)
+{
+	igt_require_f(run_intel_compute_kernel_preempt(fd), "GPU not supported\n");
+}
+
+igt_main
+{
+	int xe;
+
+	igt_fixture
+		xe = drm_open_driver(DRIVER_XE);
+
+	igt_subtest("compute-preempt")
+		test_compute_preempt(xe);
+
+	igt_fixture
+		drm_close_driver(xe);
+
+}
+
diff --git a/tests/meson.build b/tests/meson.build
index a6a8498e2..24dd1caba 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -278,6 +278,7 @@ intel_xe_progs = [
 	'xe_ccs',
 	'xe_create',
 	'xe_compute',
+	'xe_compute_preempt',
 	'xe_copy_basic',
 	'xe_dma_buf_sync',
 	'xe_debugfs',
-- 
2.25.1

      parent reply	other threads:[~2023-12-28  0:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28  0:15 [PATCH i-g-t 0/3] Add LNL compute preempt test janga.rahul.kumar
2023-12-28  0:15 ` [PATCH i-g-t 1/3] lib/intel_compute_square_kernels: Add xe2lpg wmtp sip and long running opencl kernel janga.rahul.kumar
2023-12-28 10:49   ` Nirmoy Das
2023-12-28  0:15 ` [PATCH i-g-t 2/3] lib/intel_compute: Add LNL compute preempt library support janga.rahul.kumar
2023-12-28 11:07   ` Nirmoy Das
2023-12-28  0:15 ` janga.rahul.kumar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231228001510.1399329-4-janga.rahul.kumar@intel.com \
    --to=janga.rahul.kumar@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=nirmoy.das@intel.com \
    --cc=ramadevi.gandi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox