intel / intel/llvm

[UR] [L0 v2] Synchronize queue execution during enqueue and not modify

Open
#18,149 0 comments 0 reactions 0 assignees View on GitHub
enhancement level-zero unified-runtime
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

### Is your feature request related to a problem? Please describe

Currently, to ensure that the command buffer is not executing during modification, we wait until the previous synchronization finishes before applying changes. (Command list modification requires command list to be synchronized before modifying, see for example https://oneapi-src.github.io/level-zero-spec/level-zero/latest/core/api.html#zecommandlistupdatemutablecommandsexp)
It does not make sense to make user wait there, since the modify calls should be lightweight and immediate.

### Describe the solution you would like

We can move the synchronization to command list enqueue, by remembering all requested updates, awaiting the execution before enqueueing command buffer, and applying all modifications that were requested after last execution.

### Describe alternatives you have considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.