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

[SYCL] Fixes for subbuffer reinterpretation #626

Merged
merged 2 commits into from
Sep 12, 2019

Conversation

KarachunIvan
Copy link
Contributor

This patch fixes several problems:

  1. There was no proper dependency for AllocaSubBuffer. When accessor to
    subbuffer was instantiated and was passed to kernel created with OpenCL
    interoperability, correct cl_mem object wasn't found which forced
    kernel argument to be nullptr.
  2. Memory range wasn't passed in buffer constructor in reinterpret function.
    This led to unexpected behavior after data transmission from device to host.
    We can pass the same memory range only in cases when reinterpret dimension
    equals to source dimension.
    For other cases reinterpret didn't change its behaviour.

Signed-off-by: Ivan Karachun ivan.karachun@intel.com

This patch fixes several problems:
1) There was no proper dependency for AllocaSubBuffer. When accessor to
subbuffer was instantiated and was passed to kernel created with OpenCL
interoperability, correct cl_mem object wasn't found which forced
kernel argument to be nullptr.
2) Memory range wasn't passed in buffer constructor in `reinterpret` function.
This led to unexpected behavior after data transmission from device to host.
We can pass the same memory range only in cases when reinterpret dimension
equals to source dimension.
For other cases `reinterpret` didn't change its behaviour.

Signed-off-by: Ivan Karachun <ivan.karachun@intel.com>
romanovvlad
romanovvlad previously approved these changes Sep 12, 2019
sycl/test/basic_tests/buffer/subbuffer_interop.cpp Outdated Show resolved Hide resolved
Signed-off-by: Ivan Karachun <ivan.karachun@intel.com>
@bader bader merged commit 916c32d into intel:sycl Sep 12, 2019
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.

3 participants