Skip to content

Commit

Permalink
applied Ewan's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lslusarczyk committed Jan 28, 2025
1 parent c9c474d commit 7fc11dd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions source/adapters/level_zero/v2/command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ urCommandBufferCreateExp(ur_context_handle_t context, ur_device_handle_t device,
ur_exp_command_buffer_handle_t *commandBuffer) try {
checkImmediateAppendSupport(context);

if (!context->getPlatform()->ZeMutableCmdListExt.Supported) {
if (commandBufferDesc->isUpdatable &&
!context->getPlatform()->ZeMutableCmdListExt.Supported) {
throw UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand Down Expand Up @@ -112,9 +113,9 @@ ur_result_t urCommandBufferAppendKernelLaunchExp(
uint32_t numEventsInWaitList, const ur_event_handle_t *eventWaitList,
ur_exp_command_buffer_sync_point_t *retSyncPoint, ur_event_handle_t *event,
ur_exp_command_buffer_command_handle_t *command) try {
// Need to know semantics
// - should they be checked before kernel execution or before kernel
// appending to list if latter then it is easy fix, if former then TODO
// TODO: These parameters aren't implemented in V1 yet, and are a fair amount
// of work. Need to know semantics: should they be checked before kernel
// execution (difficult) or before kernel appending to list (easy fix).
std::ignore = numEventsInWaitList;
std::ignore = eventWaitList;
std::ignore = event;
Expand Down
2 changes: 1 addition & 1 deletion source/adapters/level_zero/v2/command_list_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ur_command_list_manager::ur_command_list_manager(
ur_context_handle_t context, ur_device_handle_t device,
v2::raii::command_list_unique_handle &&commandList, v2::event_flags_t flags,
ur_queue_handle_t_ *queue)
ur_queue_handle_t queue)
: context(context), device(device),
eventPool(context->eventPoolCache.borrow(device->Id.value(), flags)),
zeCommandList(std::move(commandList)), queue(queue) {
Expand Down
2 changes: 1 addition & 1 deletion source/adapters/level_zero/v2/command_list_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ struct ur_command_list_manager : public _ur_object {
ur_device_handle_t device;
v2::raii::cache_borrowed_event_pool eventPool;
v2::raii::command_list_unique_handle zeCommandList;
ur_queue_handle_t_ *queue;
ur_queue_handle_t queue;
std::vector<ze_event_handle_t> waitList;
};
2 changes: 2 additions & 0 deletions source/adapters/level_zero/v2/queue_immediate_in_order.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,8 @@ ur_result_t ur_queue_immediate_in_order_t::enqueueGenericCommandListsExp(
uint32_t numCommandLists, ze_command_list_handle_t *phCommandLists,
ur_event_handle_t *phEvent, uint32_t numEventsInWaitList,
const ur_event_handle_t *phEventWaitList, ur_command_t callerCommand) {
TRACK_SCOPE_LATENCY(
"ur_queue_immediate_in_order_t::enqueueGenericCommandListsExp");

std::scoped_lock<ur_shared_mutex> Lock(this->Mutex);
auto zeSignalEvent = getSignalEvent(phEvent, callerCommand);
Expand Down

0 comments on commit 7fc11dd

Please sign in to comment.