-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prototype new command-list submission entrypoint #1975
base: main
Are you sure you want to change the base?
Conversation
urCommandBufferCreateExp(ur_context_handle_t Context, ur_device_handle_t Device, | ||
const ur_exp_command_buffer_desc_t *CommandBufferDesc, | ||
ur_exp_command_buffer_handle_t *CommandBuffer) { | ||
if (Device->isPVC() && Device->ImmCommandListUsed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably check for the existance of the extension here in the driver instead, something like
if (!CommandBuffer->Context->getPlatform()
->ZeDriverAppendImmediateCommandListExtensionFound)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm checking the driver version in the latest commit. But this is definitely better. Will update the code to do it in this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I implemented this but it seems that the level-zero driver is not yet reporting the extension correctly. I left a TODO to switch to this later.
12fcfa5
to
6c0b66c
Compare
Adds a new path that uses the zeCommandListImmediateAppendCommandListsExp to submit command-buffers on PVC hardware.
6c0b66c
to
a27ba98
Compare
bool IsInOrder = canBeInOrder(Context, CommandBufferDesc); | ||
bool EnableProfiling = | ||
CommandBufferDesc && CommandBufferDesc->enableProfiling; | ||
CommandBufferDesc && CommandBufferDesc->enableProfiling && !IsInOrder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change mean we can't profile in-order command-lists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In-order command-lists don't have sync-point events. So there is nothing to profile. This check already existed on the original implementation, but it was only checked during enqueue with:
const bool DoProfiling =
(UrQueue->Properties & UR_QUEUE_FLAG_PROFILING_ENABLE) &&
(!CommandBuffer->IsInOrderCmdList) &&
(CommandBuffer->IsProfilingEnabled) && Event;
Work in progress. Waiting for the new level-zero entrypoint to work before continuing.