From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
"Nishit Sharma" <nishit.sharma@intel.com>
Subject: [PATCH i-g-t v4 3/5] lib/intel_compute: Use user offsets and loop size if provided
Date: Tue, 3 Mar 2026 14:47:10 +0100 [thread overview]
Message-ID: <20260303134706.41948-10-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20260303134706.41948-7-zbigniew.kempczynski@intel.com>
If user passes its own input/output or number of iterations start
to use it instead of hardcoded ones. This pattern was already used
in other pipelines and only Xe3p missed this.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Nishit Sharma <nishit.sharma@intel.com>
---
lib/intel_compute.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/intel_compute.c b/lib/intel_compute.c
index 1165bdafd9..bfe0a75a7c 100644
--- a/lib/intel_compute.c
+++ b/lib/intel_compute.c
@@ -2189,6 +2189,8 @@ static void xe3p_compute_exec(int fd, const unsigned char *kernel,
struct inline_data idata = {};
struct bo_execenv execenv;
float *input_data, *output_data;
+ uint64_t bind_input_addr = (user && user->input_addr) ? user->input_addr : ADDR_INPUT;
+ uint64_t bind_output_addr = (user && user->output_addr) ? user->output_addr : ADDR_OUTPUT;
uint64_t indirect_addr = ADDR_GENERAL_STATE_BASE + OFFSET_INDIRECT_DATA_START;
int entries = ARRAY_SIZE(bo_dict);
int64_t timeout_one_ns = 1;
@@ -2205,7 +2207,7 @@ static void xe3p_compute_exec(int fd, const unsigned char *kernel,
memcpy(bo_dict[0].data, kernel, size);
memset(bo_dict[1].data, 0, 4096);
- xe3p_create_indirect_data(bo_dict[1].data, ADDR_INPUT, ADDR_OUTPUT,
+ xe3p_create_indirect_data(bo_dict[1].data, bind_input_addr, bind_output_addr,
execenv.loop_count);
idata.xe3p.indirect_addr_lo = indirect_addr;
idata.xe3p.indirect_addr_hi = indirect_addr >> 32;
@@ -2233,7 +2235,7 @@ static void xe3p_compute_exec(int fd, const unsigned char *kernel,
}
if (!user || (user && !user->skip_results_check))
- bo_check_square(input_data, output_data, execenv.array_size);
+ bo_check_square(input_data, output_data, execenv.loop_count);
bo_execenv_unbind(&execenv, bo_dict, entries);
bo_execenv_destroy(&execenv);
--
2.43.0
next prev parent reply other threads:[~2026-03-03 13:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 13:47 [PATCH i-g-t v4 0/5] Extend compute userenv to support user passed buffers Zbigniew Kempczyński
2026-03-03 13:47 ` [PATCH i-g-t v4 1/5] lib/intel_compute: Add types for input and output buffers Zbigniew Kempczyński
2026-03-03 13:47 ` [PATCH i-g-t v4 2/5] lib/intel_compute: Extend userenv by adding input and output bos Zbigniew Kempczyński
2026-03-03 13:47 ` Zbigniew Kempczyński [this message]
2026-03-03 15:07 ` [PATCH i-g-t v4 3/5] lib/intel_compute: Use user offsets and loop size if provided Sharma, Nishit
2026-03-03 16:37 ` Kamil Konieczny
2026-03-03 18:30 ` Sharma, Nishit
2026-03-04 7:56 ` Zbigniew Kempczyński
2026-03-03 16:31 ` Kamil Konieczny
2026-03-03 13:47 ` [PATCH i-g-t v4 4/5] tests/xe_compute: Exercise user passed buffers Zbigniew Kempczyński
2026-03-03 13:47 ` [PATCH i-g-t v4 5/5] tests/xe_compute: Use appropriate feature in compute-square tests Zbigniew Kempczyński
2026-03-03 14:56 ` [PATCH i-g-t v4 0/5] Extend compute userenv to support user passed buffers Sharma, Nishit
2026-03-04 7:59 ` Zbigniew Kempczyński
2026-03-04 3:24 ` ✓ Xe.CI.BAT: success for Extend compute userenv to support user passed buffers (rev4) Patchwork
2026-03-04 3:45 ` ✓ i915.CI.BAT: " Patchwork
2026-03-05 0:46 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-05 5:58 ` ✗ i915.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=20260303134706.41948-10-zbigniew.kempczynski@intel.com \
--to=zbigniew.kempczynski@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=nishit.sharma@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