[PATCH i-g-t 2/2] benchmarks/gem_wsim: Option to list physical engines
Bernatowicz, Marcin
marcin.bernatowicz at linux.intel.com
Wed Apr 17 08:22:40 UTC 2024
On 1/24/2024 1:25 PM, Tvrtko Ursulin wrote:
>
> On 15/01/2024 15:44, Marcin Bernatowicz wrote:
>> Added command line option (-l) to list physical engines.
>
> What is the use case and could you paste the example output please (both
> drivers if possible)?
Not a must have patch, just lists physical engines.
Sample output with extra verbosity to see [class:instance:gt] tuple:
ATSM:~# lspci -ks 0000:4d:00.0 && ~/igt/benchmarks/gem_wsim -vvvl -D
"pci:slot=0000:4d:00.0"
4d:00.0 Display controller: Intel Corporation Device 56c0 (rev 08)
Subsystem: Intel Corporation Device 4905
Kernel driver in use: i915
Kernel modules: i915, xe
Using device /dev/dri/card0
RCS [0:0:65535]
BCS [1:0:65535]
VCS1 [2:0:65535]
VCS2 [2:1:65535]
VECS1 [3:0:65535]
VECS2 [3:1:65535]
CCS1 [4:0:65535]
CCS2 [4:1:65535]
CCS3 [4:2:65535]
CCS4 [4:3:65535]
ATSM:~# lspci -ks 0000:4d:00.0 && ~/igt/benchmarks/gem_wsim -vvvl -D
"pci:slot=0000:4d:00.0"
4d:00.0 Display controller: Intel Corporation Device 56c0 (rev 08)
Subsystem: Intel Corporation Device 4905
Kernel driver in use: xe
Kernel modules: i915, xe
Using device /dev/dri/card1
RCS [0:0:0]
BCS [1:0:0]
VCS1 [2:0:0]
VCS2 [2:1:0]
VECS1 [3:0:0]
VECS2 [3:1:0]
CCS [4:0:0] - when ccs_mode = 1
ex. for ccs_mode = 4:
CCS1 [4:0:0]
CCS2 [4:1:0]
CCS3 [4:2:0]
CCS4 [4:3:0]
ADLP:~# lspci -ks 0000:00:02.0 && ~/igt/benchmarks/gem_wsim -vvvl -D
"pci:slot=0000:00:02.0"
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P
Integrated Graphics Controller (rev 0c)
DeviceName: To Be Filled by O.E.M.
Subsystem: Intel Corporation Device 2212
Kernel driver in use: i915
Kernel modules: i915, xe
Using device /dev/dri/card0
RCS [0:0:65535]
BCS [1:0:65535]
VCS1 [2:0:65535]
VCS2 [2:1:65535]
VECS [3:0:65535]
ADLP:~# lspci -ks 0000:00:02.0 && ~/igt/benchmarks/gem_wsim -vvvl -D
"pci:slot=0000:00:02.0"
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P
Integrated Graphics Controller (rev 0c)
DeviceName: To Be Filled by O.E.M.
Subsystem: Intel Corporation Device 2212
Kernel driver in use: xe
Kernel modules: i915, xe
Using device /dev/dri/card0
RCS [0:0:0]
BCS [1:0:0]
VCS1 [2:0:0]
VCS2 [2:1:0]
VECS [3:0:0]
MTLH:~# lspci -ks 0000:00:02.0 && ~/igt/benchmarks/gem_wsim -vvvl -D
"pci:slot=0000:00:02.0"
00:02.0 VGA compatible controller: Intel Corporation Device 7d55 (rev 08)
DeviceName: To Be Filled by O.E.M.
Subsystem: Intel Corporation Device 2212
Kernel driver in use: i915
Kernel modules: i915, xe
Using device /dev/dri/card0
RCS [0:0:65535]
BCS [1:0:65535]
VCS1 [2:0:65535]
VCS2 [2:1:65535]
VECS [3:0:65535]
CCS [4:0:65535]
MTLH:~# lspci -ks 0000:00:02.0 && ~/igt/benchmarks/gem_wsim -vvvl -D
"pci:slot=0000:00:02.0"
00:02.0 VGA compatible controller: Intel Corporation Device 7d55 (rev 08)
DeviceName: To Be Filled by O.E.M.
Subsystem: Intel Corporation Device 2212
Kernel driver in use: xe
Kernel modules: i915, xe
Using device /dev/dri/card0
RCS [0:0:0]
BCS [1:0:0]
CCS [4:0:0]
VCS1-1 [2:0:1]
VCS2-1 [2:1:1]
VECS-1 [3:0:1]
We see *-1 as gt is != 0, but workload definitions with VCS, VCS1,
VCS1-1 are equivalent:
MTLH:~# ~/igt/benchmarks/gem_wsim -vvv -D "pci:slot=0000:00:02.0" -w
"1.VCS1.100000.0.1"
Using device /dev/dri/card0
Random seed is 1713261312.
1 client.
0 ctx[1] VCS [2:0:1]
0: 0 bytes in working sets.
0: 0 bytes active working set in 0 buffers. 8192 in batch buffers.
*0: 0.108s elapsed (1 cycles, 9.234 workloads/s).
0.111s elapsed (9.043 workloads/s)
MTLH:~# ~/igt/benchmarks/gem_wsim -vvv -D "pci:slot=0000:00:02.0" -w
"1.VCS1-1.100000.0.1"
Using device /dev/dri/card0
Random seed is 1713261375.
1 client.
0 ctx[1] VCS [2:0:1]
0: 0 bytes in working sets.
0: 0 bytes active working set in 0 buffers. 8192 in batch buffers.
*0: 0.105s elapsed (1 cycles, 9.530 workloads/s).
0.107s elapsed (9.381 workloads/s)
MTLH:~# ~/igt/benchmarks/gem_wsim -vvv -D "pci:slot=0000:00:02.0" -w
"1.VCS.100000.0.1"
Using device /dev/dri/card0
Random seed is 1713262682.
1 client.
0 ctx[1] VCS [2:0:1]
0: 0 bytes in working sets.
0: 0 bytes active working set in 0 buffers. 8192 in batch buffers.
*0: 0.107s elapsed (1 cycles, 9.362 workloads/s).
0.108s elapsed (9.237 workloads/s)
>
> Regards,
>
> Tvrtko
>
>> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>
>> ---
>> benchmarks/gem_wsim.c | 43 ++++++++++++++++++++++++++++++++++++++++++-
>> 1 file changed, 42 insertions(+), 1 deletion(-)
>>
>> diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c
>> index e79d26513..aa70b1770 100644
>> --- a/benchmarks/gem_wsim.c
>> +++ b/benchmarks/gem_wsim.c
>> @@ -2924,6 +2924,7 @@ static void print_help(void)
>> " -f <scale> Scale factor for batch durations.\n"
>> " -F <scale> Scale factor for delays.\n"
>> " -L List GPUs.\n"
>> +" -l List physical engines.\n"
>> " -D <gpu> One of the GPUs from -L.\n"
>> );
>> }
>> @@ -2983,10 +2984,42 @@ add_workload_arg(struct w_arg *w_args,
>> unsigned int nr_args, char *w_arg,
>> return w_args;
>> }
>> +static void list_engines(void)
>> +{
>> + struct intel_engines *engines = query_engines();
>> + int engine_class_count[NUM_ENGINE_CLASSES] = {};
>> + unsigned int i;
>> +
>> + for (i = 0; i < engines->nr_engines; ++i) {
>> + igt_assert_lt(engines->engines[i].engine_class,
>> NUM_ENGINE_CLASSES);
>> + engine_class_count[engines->engines[i].engine_class]++;
>> + }
>> +
>> + for (i = 0; i < engines->nr_engines; ++i) {
>> + if (engine_class_count[engines->engines[i].engine_class] > 1)
>> + printf("%s%u",
>> +
>> intel_engine_class_string(engines->engines[i].engine_class),
>> + engines->engines[i].engine_instance + 1);
>> + else
>> + printf("%s",
>> +
>> intel_engine_class_string(engines->engines[i].engine_class));
>> +
>> + if (is_xe && engines->engines[i].gt_id)
>> + printf("-%u", engines->engines[i].gt_id);
>> +
>> + if (verbose > 3)
>> + printf(" [%d:%d:%d]", engines->engines[i].engine_class,
>> + engines->engines[i].engine_instance,
>> + engines->engines[i].gt_id);
>> + printf("\n");
>> + }
>> +}
>> +
>> int main(int argc, char **argv)
>> {
>> struct igt_device_card card = { };
>> bool list_devices_arg = false;
>> + bool list_engines_arg = false;
>> unsigned int repeat = 1;
>> unsigned int clients = 1;
>> unsigned int flags = 0;
>> @@ -3009,11 +3042,14 @@ int main(int argc, char **argv)
>> master_prng = time(NULL);
>> while ((c = getopt(argc, argv,
>> - "LhqvsSdc:r:w:W:a:p:I:f:F:D:")) != -1) {
>> + "LlhqvsSdc:r:w:W:a:p:I:f:F:D:")) != -1) {
>> switch (c) {
>> case 'L':
>> list_devices_arg = true;
>> break;
>> + case 'l':
>> + list_engines_arg = true;
>> + break;
>> case 'D':
>> device_arg = strdup(optarg);
>> break;
>> @@ -3134,6 +3170,11 @@ int main(int argc, char **argv)
>> if (is_xe)
>> xe_device_get(fd);
>> + if (list_engines_arg) {
>> + list_engines();
>> + goto out;
>> + }
>> +
>> if (!nr_w_args) {
>> wsim_err("No workload descriptor(s)!\n");
>> goto err;
More information about the igt-dev
mailing list