Replies: 2 comments 2 replies
-
Tagging @EwanC here to help answer the question |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for the question
A graph's occupation of the buffer can be released by destroying the graph that is using the buffer. See https://github.com/intel/llvm/blob/sycl/sycl/test-e2e/Graph/Inputs/basic_buffer.cpp for an example of using Alternatively, you can copy the data in the returned buffer to a host-array using a |
Beta Was this translation helpful? Give feedback.
-
RuntimeError: Host accessors cannot be created for buffers which are currently in use by a command graph.
I'm trying to develop a PyTorch extension for oneDNN. When I pass SYCL buffer memory storage between different C++ calls from Python, an error occurs.
For example, in the first Python call to a C++ function, I create a buffer like this:
After some kernel computation, I return this
test_ptr
to Python. In the next Python call, I reinterpret this pointer as a buffer and try to access it in another C++ function like this:However, the above error is thrown in
auto h_access = buffer_->get_host_access();
.Is there any way to release the command graph's occupation of the buffers or another way to copy the data in the returned buffer to a host array?
Any help would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions