From: Francois Dugast <francois.dugast@intel.com>
To: <nishit.sharma@intel.com>
Cc: <igt-dev@lists.freedesktop.org>, <zbigniew.kempczynski@intel.com>
Subject: Re: [PATCH i-g-t] tests/intel/xe_exec_system_allocator: Enhance SVM compute test
Date: Mon, 9 Mar 2026 10:55:28 +0100 [thread overview]
Message-ID: <aa6ZELD9LR7TmcAS@fdugast-desk> (raw)
In-Reply-To: <20260309043400.2280535-1-nishit.sharma@intel.com>
Hi,
On Mon, Mar 09, 2026 at 04:34:00AM +0000, nishit.sharma@intel.com wrote:
> From: Nishit Sharma <nishit.sharma@intel.com>
>
> Updated test to validate output values against expected results after
> workload execution. These enhancements improve test coverage, reliability,
> and debugging for SVM compute workloads. Updated test to validate output
> values against expected results after kernel execution.
Using a malloc'ed array for output and validating output in this test both
revert what was done in this commit, for good reasons:
373a6dbfb tests/intel/xe_exec_system_allocator: Cleanup compute test
This is because the test is used to finely trigger page fault floods from
compute kernel context (EUs) and we want to avoid interference with 1. extra
GPU page faults and 2. CPU page faults, so that we can measure the exact
impact of KMD optimizations on page fault servicing latency. Please see:
https://patchwork.freedesktop.org/series/160784/#rev2
This change would bring us back to the known previous state, which prevented
those measurements. Can you elaborate on why we need to revert?
Thanks,
Francois
>
> Signed-off-by: Nishit Sharma <nishit.sharma@intel.com>
> ---
> tests/intel/xe_exec_system_allocator.c | 20 ++++++++++++++++----
> 1 file changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/tests/intel/xe_exec_system_allocator.c b/tests/intel/xe_exec_system_allocator.c
> index 14f5e358f..e670ee007 100644
> --- a/tests/intel/xe_exec_system_allocator.c
> +++ b/tests/intel/xe_exec_system_allocator.c
> @@ -2257,7 +2257,7 @@ test_compute(int fd, size_t size, unsigned int flags)
> */
> .array_size = size / sizeof(float),
> };
> - float *compute_input;
> + float *compute_input, *compute_output;
> int i;
>
> vm = xe_vm_create(fd, DRM_XE_VM_CREATE_FLAG_LR_MODE | DRM_XE_VM_CREATE_FLAG_FAULT_MODE, 0);
> @@ -2267,19 +2267,31 @@ test_compute(int fd, size_t size, unsigned int flags)
> xe_wait_ufence(fd, &bo_sync->sync, USER_FENCE_VALUE, 0, FIVE_SEC);
>
> compute_input = aligned_alloc(SZ_2M, size);
> - igt_assert(compute_input);
> + compute_output = aligned_alloc(SZ_2M, size);
> + igt_assert(compute_input && compute_output);
>
> - env.loop_count = (flags & TOUCH_ONCE) ? 1 : env.array_size;
> + env.loop_count = (flags & TOUCH_ONCE) ? 1 : env.array_size / 2;
> env.skip_results_check = !(flags & ACCESS_DEVICE_HOST);
> env.input_addr = to_user_pointer(compute_input);
> + env.output_addr = to_user_pointer(compute_output);
> env.vm = vm;
>
> for (i = 0; i < env.loop_count; i++)
> - compute_input[i] = rand() / (float)RAND_MAX;
> + compute_input[i] = (float)i + 2.0f;
>
> run_intel_compute_kernel(fd, &env, EXECENV_PREF_SYSTEM);
>
> + for (i = 0; i < env.loop_count; i++) {
> + float expected_output = compute_input[i] * compute_input[i];
> +
> + if (compute_output[i] != expected_output || compute_output[i] == 0.0f)
> + igt_debug("[%4d] input:%f output:%f expected_output:%f\n",
> + i, compute_input[i], compute_output[i], expected_output);
> + igt_assert_eq_double(compute_output[i], expected_output);
> + }
> +
> free(compute_input);
> + free(compute_output);
> unbind_system_allocator();
> xe_vm_destroy(fd, vm);
> }
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-03-09 9:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 4:34 [PATCH i-g-t] tests/intel/xe_exec_system_allocator: Enhance SVM compute test nishit.sharma
2026-03-09 6:04 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-03-09 6:09 ` ✓ i915.CI.BAT: " Patchwork
2026-03-09 7:16 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-09 8:27 ` ✗ i915.CI.Full: " Patchwork
2026-03-09 9:43 ` [PATCH i-g-t] " Zbigniew Kempczyński
2026-03-09 9:55 ` Francois Dugast [this message]
2026-03-09 10:01 ` Sharma, Nishit
2026-03-09 10:19 ` Francois Dugast
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=aa6ZELD9LR7TmcAS@fdugast-desk \
--to=francois.dugast@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=nishit.sharma@intel.com \
--cc=zbigniew.kempczynski@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