-
Notifications
You must be signed in to change notification settings - Fork 3
[SYCL][Graph] Error on invalid buffer behaviour #287
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][Graph] Error on invalid buffer behaviour #287
Conversation
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.
This is all looking good, but I'll wait on the spec draft for assume_data_outlives_buffer
before hitting approve to make sure my understanding aligns.
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.
LGTM.
@gmlueck mentioned in this comment you have tagged as reference to this PR: "Passing the property to begin_recording() is an assertion by the user that buffers may be safely recorded until the next call to end_recording() for this queue. "
Is there a reason not to implement this behaviour?
sycl/test-e2e/Graph/Inputs/assume_data_outlives_buffer_property.cpp
Outdated
Show resolved
Hide resolved
This is also a problem that would affect the explicit API, if you add a node which uses buffers then delete the host data you have the same problem. So it seemed to me this would be better placed as a graph property. Edit: Ah I see now that he has mentioned adding both. To me this seems unnecessary and a bit error prone, so I would be in favour of keeping on graph construction only. |
f85028d
to
993c0f3
Compare
Removes the test-e2e dependency to graph_impl.hpp by changing the e2e test to an unitests.
- Error for buffers with write back enabled. - Error for host accessors to buffers in use by a graph. - Unit tests added for these cases - Fixed E2E tests which were not compliant with these restrictions.
- Add assume_data_outlives_buffer property - Add check to disallow buffers with host data without this property - Add a generic test for this. - Update E2E tests which now require the property
- Use weak_ptrs in both classes to prevent circular references and unnecessary lifetime extensions - Update unit tests for new properties
26e1db5
to
d4e2858
Compare
6af80ab
to
e578f69
Compare
* [SYCL][Graph] Makes command graph functions thread-safe (bugfix) Removes the test-e2e dependency to graph_impl.hpp by changing the e2e test to an unitests. * [SYCL][Graph] Error on invalid buffer behaviour - Error for buffers with write back enabled. - Error for host accessors to buffers in use by a graph. - Unit tests added for these cases - Fixed E2E tests which were not compliant with these restrictions. * [SYCL][Graph] Implement assume_data_outlives_buffer property - Add assume_data_outlives_buffer property - Add check to disallow buffers with host data without this property - Add a generic test for this. - Update E2E tests which now require the property * Update symbol dumps * [SYCL][Graph] Implement assume_buffer_outlives_graph property and checks * [SYCL][Graph] Add E2E test for assume_buffer_outlives_graph property * [SYCL][Graph] Fix circular reference between queue and graph_impl - Use weak_ptrs in both classes to prevent circular references and unnecessary lifetime extensions - Update unit tests for new properties * [SYCL][Graph] Remove unnecessary test line * [SYCL][Graph] Make graph use count in memobjects atomic * [SYCL][Graph] Make markNoLongerBeingUsedInGraph() thread safe --------- Co-authored-by: Maxime France-Pillois <maxime.francepillois@codeplay.com> Co-authored-by: Ewan Crawford <ewan@codeplay.com>
* [SYCL][Graph] Makes command graph functions thread-safe (bugfix) Removes the test-e2e dependency to graph_impl.hpp by changing the e2e test to an unitests. * [SYCL][Graph] Error on invalid buffer behaviour - Error for buffers with write back enabled. - Error for host accessors to buffers in use by a graph. - Unit tests added for these cases - Fixed E2E tests which were not compliant with these restrictions. * [SYCL][Graph] Implement assume_data_outlives_buffer property - Add assume_data_outlives_buffer property - Add check to disallow buffers with host data without this property - Add a generic test for this. - Update E2E tests which now require the property * Update symbol dumps * [SYCL][Graph] Implement assume_buffer_outlives_graph property and checks * [SYCL][Graph] Add E2E test for assume_buffer_outlives_graph property * [SYCL][Graph] Fix circular reference between queue and graph_impl - Use weak_ptrs in both classes to prevent circular references and unnecessary lifetime extensions - Update unit tests for new properties * [SYCL][Graph] Remove unnecessary test line * [SYCL][Graph] Make graph use count in memobjects atomic * [SYCL][Graph] Make markNoLongerBeingUsedInGraph() thread safe --------- Co-authored-by: Maxime France-Pillois <maxime.francepillois@codeplay.com> Co-authored-by: Ewan Crawford <ewan@codeplay.com>
property::graph::assume_data_outlives_buffer
and associated check as described in this comment on the spec: [SYCL][Graph] Promote graph spec status to experimental intel/llvm#10473 (comment)