public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
	"Priyanka Dandamudi" <priyanka.dandamudi@intel.com>
Subject: [PATCH i-g-t 3/3] tests/xe_compute: Exercise larger buffers passed from the user
Date: Wed,  1 Apr 2026 11:10:21 +0200	[thread overview]
Message-ID: <20260401091017.2772519-8-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20260401091017.2772519-5-zbigniew.kempczynski@intel.com>

Verify larger buffers are properly handled in intel library when
they are passed via userenv.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Priyanka Dandamudi <priyanka.dandamudi@intel.com>
---
 tests/intel/xe_compute.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/tests/intel/xe_compute.c b/tests/intel/xe_compute.c
index ef2d891667..406d708bcd 100644
--- a/tests/intel/xe_compute.c
+++ b/tests/intel/xe_compute.c
@@ -519,6 +519,14 @@ test_compute_square(int fd)
  *	Run an openCL Kernel that returns output[i] = input[i] * input[i],
  *	taking buffers from userenv.
  *
+ * SUBTEST: compute-square-userenv-large-buffer
+ * Mega feature: Compute
+ * Sub-category: compute tests
+ * Functionality: OpenCL kernel
+ * Description:
+ *	Run an openCL Kernel that returns output[i] = input[i] * input[i],
+ *	taking large buffers from userenv.
+ *
  * SUBTEST: compute-square-userenv-isvm
  * Mega feature: Compute
  * Sub-category: compute tests
@@ -546,6 +554,8 @@ test_compute_square(int fd)
 
 #define INPUT_IN_SVM		(1 << 0)
 #define OUTPUT_IN_SVM		(1 << 1)
+#define LARGE_BUFFER		(1 << 2)
+#define LARGE_BUFFER_SIZE	(SZ_2M + SZ_1M)
 #define INPUT_BO_ADDR		0x30000000
 #define OUTPUT_BO_ADDR		0x31000000
 #define USER_FENCE_VALUE	0xdeadbeefdeadbeefull
@@ -568,6 +578,8 @@ test_compute_square_userenv(int fd, uint32_t flags)
 	float *input, *output;
 	int i;
 
+	if (flags & LARGE_BUFFER)
+		size = LARGE_BUFFER_SIZE;
 	size = ALIGN(size, xe_get_default_alignment(fd));
 	env.array_size = size / sizeof(float);
 
@@ -616,7 +628,10 @@ test_compute_square_userenv(int fd, uint32_t flags)
 		env.output_addr = OUTPUT_BO_ADDR;
 	}
 
-	env.loop_count = env.array_size / 2;
+	if (flags == LARGE_BUFFER)
+		env.loop_count = env.array_size;
+	else
+		env.loop_count = env.array_size / 2;
 
 	/* Skip check in the library and verify user controls data locally */
 	env.skip_results_check = true;
@@ -670,6 +685,9 @@ int igt_main()
 	igt_subtest("compute-square-userenv")
 		test_compute_square_userenv(xe, 0);
 
+	igt_subtest("compute-square-userenv-large-buffer")
+		test_compute_square_userenv(xe, LARGE_BUFFER);
+
 	igt_subtest("compute-square-userenv-isvm")
 		test_compute_square_userenv(xe, INPUT_IN_SVM);
 
-- 
2.43.0


  parent reply	other threads:[~2026-04-01  9:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-01  9:10 [PATCH i-g-t 0/3] Exercise large buffer in compute-square Zbigniew Kempczyński
2026-04-01  9:10 ` [PATCH i-g-t 1/3] lib/intel_compute: Print handle in list of bindings Zbigniew Kempczyński
2026-04-02  4:54   ` Dandamudi, Priyanka
2026-04-01  9:10 ` [PATCH i-g-t 2/3] tests/xe_compute: Don't use FAULT_MODE flag when not needed Zbigniew Kempczyński
2026-04-02  4:55   ` Dandamudi, Priyanka
2026-04-01  9:10 ` Zbigniew Kempczyński [this message]
2026-04-02  4:55   ` [PATCH i-g-t 3/3] tests/xe_compute: Exercise larger buffers passed from the user Dandamudi, Priyanka
2026-04-01 16:00 ` ✓ Xe.CI.BAT: success for Exercise large buffer in compute-square Patchwork
2026-04-01 16:19 ` ✗ i915.CI.BAT: failure " Patchwork
2026-04-02 13:43   ` Zbigniew Kempczyński
2026-04-01 20:36 ` ✗ Xe.CI.FULL: " Patchwork
2026-04-02 13:45   ` Zbigniew Kempczyński
2026-04-01 22:30 ` ✓ Xe.CI.BAT: success for Exercise large buffer in compute-square (rev2) Patchwork
2026-04-01 22:46 ` ✗ i915.CI.BAT: failure " Patchwork
2026-04-02  5:51 ` ✗ Xe.CI.FULL: " Patchwork

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=20260401091017.2772519-8-zbigniew.kempczynski@intel.com \
    --to=zbigniew.kempczynski@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=priyanka.dandamudi@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