Skip to content
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

Clarify Acquire/Release behavior for external memory #1176

Merged
merged 4 commits into from
Jul 16, 2024

Conversation

nikhiljnv
Copy link
Contributor

Clarify Acquire/Release behavior for external memory specs to call out the scope of operations as well as
the behavior in case of multiple acquire/release calls.

Fixes #1078, #1086

Clarify Acquire/Release behavior for external memory specs
to call out the scope of operations as well as
the behavior in case of multiple acquire/release calls.

Fixes #1078, #1086
@bcalidas
Copy link

Looks good generally.

api/opencl_runtime_layer.asciidoc Outdated Show resolved Hide resolved
api/opencl_runtime_layer.asciidoc Outdated Show resolved Hide resolved
api/opencl_runtime_layer.asciidoc Outdated Show resolved Hide resolved
api/opencl_runtime_layer.asciidoc Outdated Show resolved Hide resolved
api/opencl_runtime_layer.asciidoc Outdated Show resolved Hide resolved
api/opencl_runtime_layer.asciidoc Show resolved Hide resolved
that was one of the devices specified via {CL_MEM_DEVICE_HANDLE_LIST_KHR}
when the memory object was imported using {clCreateBufferWithProperties} or
{clCreateImageWithProperties}. If {CL_MEM_DEVICE_HANDLE_LIST_KHR} was not
specified, the acquire can be performed on a command-queue associated with
Copy link

@bcalidas bcalidas May 31, 2024

Choose a reason for hiding this comment

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

The release can be performed on a command queue ...

Address review comments on PR#1176

Fixes #1078, #1086
Address some of the comments that were
left out in earlier update.
api/opencl_runtime_layer.asciidoc Outdated Show resolved Hide resolved
The following restrictions shall apply -
* Each memory object must be released only once. Releasing a memory object
multiple times without acquiring it results in implementation-defined
behavior.
Copy link
Contributor

Choose a reason for hiding this comment

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

Strictly speaking this is ambiguous (and so is the mirror statement above for acquire operations). There might be a better formulation, possibly describing this in terms of number of acquire/release operations but the current text is a clear step forward so fine if you want to merge it as is.

Fix the typo suggested by Kevin to replace aquired to acquired.

Co-authored-by: Kévin Petit <kevin.petit@arm.com>
Copy link
Contributor

@bashbaug bashbaug left a comment

Choose a reason for hiding this comment

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

Merging as discussed in the July 16th memory subgroup.

@bashbaug bashbaug merged commit 6be4f45 into main Jul 16, 2024
3 checks passed
@kpet kpet deleted the external_memory_acquire_release branch July 16, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Clarify the scope of clEnqueueAcquireExternalMemObjectsKHR and clEnqueueReleaseExternalMemObjectsKHR
4 participants