From: "Grzegorzek, Dominik" <dominik.grzegorzek@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"Maslak, Jan" <jan.maslak@intel.com>
Cc: "Roper, Matthew D" <matthew.d.roper@intel.com>,
"Cavitt, Jonathan" <jonathan.cavitt@intel.com>
Subject: Re: [PATCH 3/3] tests/xe_eudebug_online: update thread count handling in query_attention_bitmask_size()
Date: Thu, 21 Nov 2024 10:18:40 +0000 [thread overview]
Message-ID: <bdd229fcbe8a8b7654776bf20577bb691f2b3999.camel@intel.com> (raw)
In-Reply-To: <20241120222850.1497784-4-jan.maslak@intel.com>
On Wed, 2024-11-20 at 22:28 +0000, Jan Maslak wrote:
> Update query_attention_bitmask_size() function to fetch the EU thread
> count from hwconfig, instead of being hardcoded.
>
> Signed-off-by: Jan Maslak <jan.maslak@intel.com>
> ---
> tests/intel/xe_eudebug_online.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/tests/intel/xe_eudebug_online.c b/tests/intel/xe_eudebug_online.c
> index 0ef0d8093..78d9d4bc3 100644
> --- a/tests/intel/xe_eudebug_online.c
> +++ b/tests/intel/xe_eudebug_online.c
> @@ -1118,7 +1118,9 @@ static bool intel_gen_has_lockstep_eus(int fd)
>
> static int query_attention_bitmask_size(int fd, int gt)
> {
> - const unsigned int threads = 8;
> + uint32_t thread_count_len;
> + uint32_t *thread_count_ptr;
> + uint32_t thread_count;
> struct drm_xe_query_topology_mask *c_dss = NULL, *g_dss = NULL, *eu_per_dss = NULL;
> struct drm_xe_query_topology_mask *topology;
> struct drm_xe_device_query query = {
> @@ -1130,6 +1132,11 @@ static int query_attention_bitmask_size(int fd, int gt)
> int pos = 0, eus;
> uint8_t *any_dss;
>
> + thread_count_ptr = xe_hwconfig_lookup_value(fd, INTEL_HWCONFIG_NUM_THREADS_PER_EU,
> + &thread_count_len);
> + igt_assert(thread_count_ptr);
I would assert as well thread_count_len to be desired size. Other than that, it is:
Reviewed-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Regards,
Dominik
> + thread_count = *thread_count_ptr;
> +
> igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), 0);
> igt_assert_neq(query.size, 0);
>
> @@ -1178,8 +1185,9 @@ static int query_attention_bitmask_size(int fd, int gt)
>
> free(any_dss);
> free(topology);
> + free(thread_count_ptr);
>
> - return eus * threads / 8;
> + return eus * DIV_ROUND_UP(thread_count, 8);
> }
>
> static struct drm_xe_eudebug_event_exec_queue *
next prev parent reply other threads:[~2024-11-21 10:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 22:28 [PATCH 0/3] tests/xe_eudebug_online: update thread count handling in query_attention_bitmask_size() Jan Maslak
2024-11-20 22:28 ` [PATCH 1/3] lib/xe_query: add hwconfig to xe_device Jan Maslak
2024-11-26 8:34 ` Grzegorzek, Dominik
2024-11-20 22:28 ` [PATCH 2/3] lib/xe_query: add xe_hwconfig_lookup_value() helper Jan Maslak
2024-11-26 9:13 ` Grzegorzek, Dominik
2024-11-26 9:16 ` Grzegorzek, Dominik
2024-11-20 22:28 ` [PATCH 3/3] tests/xe_eudebug_online: update thread count handling in query_attention_bitmask_size() Jan Maslak
2024-11-21 10:18 ` Grzegorzek, Dominik [this message]
2024-11-20 22:54 ` ✗ GitLab.Pipeline: warning for tests/xe_eudebug_online: update thread count handling in query_attention_bitmask_size() (rev2) Patchwork
2024-11-20 23:19 ` ✓ Fi.CI.BAT: success " Patchwork
2024-11-21 6:43 ` ✗ Xe.CI.Full: failure " Patchwork
2024-11-24 8:17 ` ✗ i915.CI.Full: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-11-28 13:05 [PATCH 0/3] tests/xe_eudebug_online: update thread count handling in query_attention_bitmask_size() Jan Maslak
2024-11-28 13:05 ` [PATCH 3/3] " Jan Maslak
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=bdd229fcbe8a8b7654776bf20577bb691f2b3999.camel@intel.com \
--to=dominik.grzegorzek@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jan.maslak@intel.com \
--cc=jonathan.cavitt@intel.com \
--cc=matthew.d.roper@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