Skip to content

Conversation

mmichel11
Copy link
Contributor

Follow-up to #20291

  • Adds unit test to ensure linear graphs are not tracking sync points and non-linear graphs are tracking sync points.
  • Forward declares a test friend class in exec_graph_impl to be able to inspect the optimizations performed on private members.

#include <vector> // for vector

// For testing of graph internals
class GraphImplTest;
Copy link
Contributor Author

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.

// For testing purposes
class ProgramManagerTest;

friend class ::ProgramManagerTest;

@mmichel11 mmichel11 marked this pull request as ready for review October 10, 2025 21:18
@mmichel11 mmichel11 requested a review from a team as a code owner October 10, 2025 21:18
@mmichel11 mmichel11 requested a review from reble October 10, 2025 21:18
@mmichel11
Copy link
Contributor Author

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{};
Copy link
Contributor

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.

Copy link
Contributor Author

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>

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.

2 participants