-
Notifications
You must be signed in to change notification settings - Fork 792
[SYCL][Graph] Add test for linear graph optimizations #20340
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
base: sycl
Are you sure you want to change the base?
Conversation
#include <vector> // for vector | ||
|
||
// For testing of graph internals | ||
class GraphImplTest; |
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.
Followed a similar approach to validating class private members that is used in other places, e.g.
llvm/sycl/source/detail/program_manager/program_manager.hpp
Lines 52 to 53 in dfd72fc
// For testing purposes | |
class ProgramManagerTest; |
friend class ::ProgramManagerTest; |
CI failure is an unrelated known issue: #19951 |
|
||
// Helper to build a linear chain of N kernels on a queue inside graph capture. | ||
static void BuildLinearChain(queue &Queue, bool IsInOrderQueue, int N) { | ||
sycl::event Event{}; |
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.
Wondering if we could use something like std::optional<sycl::event>
here, to improve the no-event state recording. Since event is only really needed for the out-of-order queue case and its explicit dependencies.
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.
I switched to use the eventless single_task
enqueue function for the in-order case. The out-of-order case still uses explicit dependencies with events. Also switched to use std::optional<sycl::event>
Signed-off-by: Matthew Michel <[email protected]>
Follow-up to #20291
exec_graph_impl
to be able to inspect the optimizations performed on private members.