Skip to content

[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

Open
wants to merge 1 commit into
base: sycl
Choose a base branch
from

Conversation

konradkusiak97
Copy link
Contributor

Command Buffer, while it is still executing.

@konradkusiak97 konradkusiak97 requested a review from a team as a code owner May 22, 2025 10:50
@konradkusiak97 konradkusiak97 requested a review from EwanC May 22, 2025 10:50
@@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this solution work if the UR caller doesn't pass a phEvent to urEnqueueCommandBufferExp, and then does a command-buffer release? Note, this is what your CTS test does.

@@ -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."
Copy link
Contributor

Choose a reason for hiding this comment

The 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

It is legal to call the entry-point while hCommandBuffer is still executing, which will block on completion if the reference count of hCommandBuffer becomes zero.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds better, thanks 👍

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants