@@ -288,58 +288,6 @@ uint64_t get_free_memory_state(ze_device_handle_t device) {
288
288
return total_free_memory;
289
289
}
290
290
291
- ze_result_t copy_workload (ze_device_handle_t device,
292
- ze_device_mem_alloc_desc_t *device_desc,
293
- void *src_ptr, void *dst_ptr, int32_t local_size) {
294
-
295
- ze_result_t result = ZE_RESULT_SUCCESS;
296
- void *src_buffer = src_ptr;
297
- void *dst_buffer = dst_ptr;
298
- int32_t offset = 0 ;
299
-
300
- ze_module_handle_t module = lzt::create_module (
301
- device, " copy_module.spv" , ZE_MODULE_FORMAT_IL_SPIRV, nullptr , nullptr );
302
- ze_kernel_handle_t function = lzt::create_function (module , " copy_data" );
303
-
304
- lzt::set_group_size (function, 1 , 1 , 1 );
305
- lzt::set_argument_value (function, 0 , sizeof (src_buffer), &src_buffer);
306
- lzt::set_argument_value (function, 1 , sizeof (dst_buffer), &dst_buffer);
307
- lzt::set_argument_value (function, 2 , sizeof (int32_t ), &offset);
308
- lzt::set_argument_value (function, 3 , sizeof (int32_t ), &local_size);
309
-
310
- ze_command_list_handle_t cmd_list = lzt::create_command_list (device);
311
-
312
- const int32_t group_count_x = 1 ;
313
- const int32_t group_count_y = 1 ;
314
- ze_group_count_t tg;
315
- tg.groupCountX = group_count_x;
316
- tg.groupCountY = group_count_y;
317
- tg.groupCountZ = 1 ;
318
-
319
- result = zeCommandListAppendLaunchKernel (cmd_list, function, &tg, nullptr , 0 ,
320
- nullptr );
321
- if (result != ZE_RESULT_SUCCESS) {
322
- return result;
323
- }
324
-
325
- lzt::append_barrier (cmd_list, nullptr , 0 , nullptr );
326
- lzt::close_command_list (cmd_list);
327
- ze_command_queue_handle_t cmd_q = lzt::create_command_queue (device);
328
-
329
- result = zeCommandQueueExecuteCommandLists (cmd_q, 1 , &cmd_list, nullptr );
330
- if (result != ZE_RESULT_SUCCESS) {
331
- return result;
332
- }
333
-
334
- lzt::synchronize (cmd_q, UINT64_MAX);
335
- lzt::destroy_command_queue (cmd_q);
336
- lzt::destroy_command_list (cmd_list);
337
- lzt::destroy_function (function);
338
- lzt::destroy_module (module );
339
-
340
- return result;
341
- }
342
-
343
291
TEST_F (
344
292
MEMORY_TEST,
345
293
GivenValidMemHandleWhenAllocatingMemoryUptoMaxCapacityThenOutOfDeviceMemoryErrorIsReturned) {
0 commit comments