tests/intel/xe_compute: Add Compute workload Scheduling and Display EU busyness
Subsystems (2)
PATCH v4 1/1 tests/intel/xe_compute: Add Compute workload Scheduling and Display EU busyness
From: Nishit Sharma <[email protected]>
Adds compute workload scheduling and execution on multi-ccs available.
This also adds logic to show EU busyness information on console while workload is running on multiple CCS engine instances.
--- lib/intel_compute.c | 19 +- lib/intel_compute.h | 2 + tests/intel/xe_compute.c | 764 +++++++++++++++++++++++++++++++++++++++ tests/meson.build | 1 + 4 files changed, 783 insertions(+), 3 deletions(-)
lib/intel_compute.c +16 -3
@@ -249,8 +249,14 @@ static void bo_execenv_bind(struct bo_execenv *execenv,break ; } - bo_dict[i].handle =xe_bo_create (fd, execenv->vm, bo_dict[i].size, - placement, flags); +if (!execenv->user) + bo_dict[i].handle =xe_bo_create (fd, execenv->vm, bo_dict[i].size, + placement, flags); +else if (execenv->user) + bo_dict[i].handle =xe_bo_create_caching (fd, execenv->vm, + bo_dict[i].size, + placement, flags, +DRM_XE_GEM_CPU_CACHING_WC ); bo_dict[i].data =xe_bo_map (fd, bo_dict[i].handle, bo_dict[i].size);xe_vm_bind_async (fd, vm,0 , bo_dict[i].handle,0 , bo_dict[i].addr, bo_dict[i].size, &sync,1 );
@@ -1867,7 +1873,14 @@ static void xe2lpg_compute_exec(int fd, const unsigned char *kernel,OFFSET_KERNEL ,0 , false, execenv.array_size); -bo_execenv_exec (&execenv,ADDR_BATCH ); +if (user && user->loop_kernel_duration) { +bo_execenv_exec_async (&execenv,ADDR_BATCH ); +igt_measured_usleep (user->loop_kernel_duration); + ((int *)bo_dict[4 ].data)[0 ] =MAGIC_LOOP_STOP ; +bo_execenv_sync (&execenv); + user->skip_results_check =1 ; + }else +bo_execenv_exec (&execenv,ADDR_BATCH );for (int i =0 ; i < execenv.array_size; i++) {float input = input_data[i];
lib/intel_compute.h +2 -0
@@ -63,6 +63,8 @@ struct user_execenv {uint64_t input_addr;/** @output_addr: override default address of the output array if provided */ uint64_t output_addr; +/** @loop_kernel_duration: duration till kernel should execute in gpu **/ +uint32_t loop_kernel_duration; };enum execenv_alloc_prefs {
tests/intel/xe_compute.c +764 -0
786 lines not on this page · raw message
tests/meson.build +1 -0
@@ -404,6 +404,7 @@ extra_dependencies = { 'sw_sync': [ libatomic ], 'xe_fault_injection': [ lib_igt_xe_oa ], 'xe_oa': [ lib_igt_xe_oa ], + 'xe_compute': [ igt_deps,lib_igt_perf,lib_igt_drm_clients,lib_igt_drm_fdinfo,lib_igt_profiling,math ], } test_executables = []
Signature · 1 line
2.43.0
Patchwork
CI✗ Fi.CI.BUILD: failure for tests/intel/xe_compute: Add Compute workload Scheduling and Display EU busyness (rev2)
== Series Details ==
== Series Details ==
Series: tests/intel/xe_compute: Add Compute workload Scheduling and Display EU busyness (rev2)
URL : https://patchwork.freedesktop.org/series/151192/
State : failure
== Summary ==
Applying: tests/intel/xe_compute: Add Compute workload Scheduling and Display EU busyness Using index info to reconstruct a base tree...
M lib/intel_compute.c
M tests/intel/xe_compute.c
M tests/meson.build
Falling back to patching base and 3-way merge...
Auto-merging tests/meson.build
Auto-merging tests/intel/xe_compute.c
CONFLICT (content): Merge conflict in tests/intel/xe_compute.c
Auto-merging lib/intel_compute.c
Patch failed at 0001 tests/intel/xe_compute: Add Compute workload Scheduling and Display EU busyness When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".