-
Notifications
You must be signed in to change notification settings - Fork 770
[SYCL][Graph] Modified the adapters such that it is valid to call release on... #18619
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
base: sycl
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -563,3 +563,4 @@ Contributors | |
* Maxime France-Pillois `[email protected] <[email protected]>`_ | ||
* Aaron Greig `[email protected] <[email protected]>`_ | ||
* Fábio Mestre `[email protected] <[email protected]>`_ | ||
* Konrad Kusiak `[email protected] <[email protected]>`_ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -310,7 +310,7 @@ returns: | |
- $X_RESULT_ERROR_OUT_OF_HOST_MEMORY | ||
--- #-------------------------------------------------------------------------- | ||
type: function | ||
desc: "Decrement the command-buffer object's reference count and delete the command-buffer object if the reference count becomes zero." | ||
desc: "Decrement the command-buffer object's reference count and delete the command-buffer object if the reference count becomes zero. It will try synchronizing the command-buffer, hence it is legal to call it while command-buffer is still executing." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "It will try synchronizing the command-buffer," makes it sound like this will happen even if the reference count isn't zero. So would flip round the two phrases, something like
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That sounds better, thanks 👍 |
||
class: $xCommandBuffer | ||
name: ReleaseExp | ||
params: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -388,6 +388,9 @@ urCommandBufferRetainExp(ur_exp_command_buffer_handle_t hCommandBuffer) { | |
UR_APIEXPORT ur_result_t UR_APICALL | ||
urCommandBufferReleaseExp(ur_exp_command_buffer_handle_t hCommandBuffer) { | ||
if (hCommandBuffer->decrementReferenceCount() == 0) { | ||
if (hCommandBuffer->CurrentExecution) { | ||
UR_CHECK_ERROR(hCommandBuffer->CurrentExecution->wait()); | ||
} | ||
// Ref count has reached zero, release of created commands | ||
for (auto &Command : hCommandBuffer->CommandHandles) { | ||
commandHandleDestroy(Command); | ||
|
@@ -1175,6 +1178,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueCommandBufferExp( | |
if (phEvent) { | ||
UR_CHECK_ERROR(RetImplEvent->record()); | ||
*phEvent = RetImplEvent.release(); | ||
hCommandBuffer->CurrentExecution = *phEvent; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this solution work if the UR caller doesn't pass a |
||
} | ||
return UR_RESULT_SUCCESS; | ||
} catch (ur_result_t Err) { | ||
|
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 think we need to call the
generate
build target to regenerate the doyxgen in the headers.