|
18 | 18 | ur_command_list_manager::ur_command_list_manager( |
19 | 19 | ur_context_handle_t context, ur_device_handle_t device, |
20 | 20 | v2::raii::command_list_unique_handle &&commandList, v2::event_flags_t flags, |
21 | | - ur_queue_t_ *queue) |
22 | | - : context(context), device(device), |
23 | | - eventPool(context->getEventPoolCache().borrow(device->Id.value(), flags)), |
24 | | - zeCommandList(std::move(commandList)), queue(queue) { |
| 21 | + ur_queue_t_ *queue, PoolCacheType listType) |
| 22 | + : context(context), device(device), zeCommandList(std::move(commandList)), |
| 23 | + queue(queue) { |
| 24 | + auto &eventPoolTmp = context->getEventPoolCache(listType); |
| 25 | + eventPool = eventPoolTmp.borrow(device->Id.value(), flags); |
25 | 26 | UR_CALL_THROWS(ur::level_zero::urContextRetain(context)); |
26 | 27 | UR_CALL_THROWS(ur::level_zero::urDeviceRetain(device)); |
27 | 28 | } |
@@ -320,17 +321,18 @@ ur_result_t ur_command_list_manager::appendUSMPrefetch( |
320 | 321 | return UR_RESULT_SUCCESS; |
321 | 322 | } |
322 | 323 |
|
323 | | -ur_result_t |
324 | | -ur_command_list_manager::appendUSMAdvise(const void *pMem, size_t size, |
325 | | - ur_usm_advice_flags_t advice, |
326 | | - ur_event_handle_t *phEvent) { |
| 324 | +ur_result_t ur_command_list_manager::appendUSMAdvise( |
| 325 | + const void *pMem, size_t size, ur_usm_advice_flags_t advice, |
| 326 | + uint32_t numEventsInWaitList, const ur_event_handle_t *phEventWaitList, |
| 327 | + ur_event_handle_t *phEvent) { |
327 | 328 | TRACK_SCOPE_LATENCY("ur_command_list_manager::appendUSMAdvise"); |
328 | 329 |
|
329 | 330 | auto zeAdvice = ur_cast<ze_memory_advice_t>(advice); |
330 | 331 |
|
331 | 332 | auto zeSignalEvent = getSignalEvent(phEvent, UR_COMMAND_USM_ADVISE); |
332 | 333 |
|
333 | | - auto [pWaitEvents, numWaitEvents] = getWaitListView(nullptr, 0); |
| 334 | + auto [pWaitEvents, numWaitEvents] = |
| 335 | + getWaitListView(phEventWaitList, numEventsInWaitList); |
334 | 336 |
|
335 | 337 | if (pWaitEvents) { |
336 | 338 | ZE2UR_CALL(zeCommandListAppendWaitOnEvents, |
|
0 commit comments