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][Graph] Refactor node storage inside graphs #334

Closed
wants to merge 3 commits into from

Conversation

Bensuo
Copy link
Collaborator

@Bensuo Bensuo commented Oct 20, 2023

  • Store graph nodes inside a vector instead for more optimal searches
  • Replace several depth first search operations with iterations over node storage
  • Node successors are now weak_ptrs
  • Remove node_impl::operator== and move functionality to isSimilar()
  • Unit tests updated to reflect changes

@Bensuo Bensuo added the Graph Implementation Related to DPC++ implementation and testing label Oct 20, 2023
Copy link
Collaborator

@EwanC EwanC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall the change LGTM, do have minor comments on:

  • braces on if statements
  • using const in some functions.

My only other comment is that the PR description says: "Store graph nodes inside a vector instead of in a linked list". But we're not removing any member variables from the graph, so the linked list structure is still there to use (albeit via weak_ptrs). So think this bulletpoint could be rephrased to something like "Store graph nodes inside a vector for more optimal search" (or whatever)

sycl/source/detail/graph_impl.cpp Outdated Show resolved Hide resolved
sycl/source/detail/graph_impl.cpp Outdated Show resolved Hide resolved
sycl/source/detail/graph_impl.cpp Outdated Show resolved Hide resolved
sycl/source/detail/graph_impl.hpp Outdated Show resolved Hide resolved
sycl/source/detail/graph_impl.hpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@julianmi julianmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

sycl/source/detail/graph_impl.cpp Outdated Show resolved Hide resolved
- Store graph nodes inside a vector for more optimal search
- Replace several depth first search operations with iterations over node storage
- Node successors are now weak_ptrs
- Remove node_impl::operator== and move functionality to isSimilar()
- Unit tests updated to reflect changes
- Style fixes
- Make MRoots weak_ptrs instead of shared
Copy link
Collaborator

@mfrancepillois mfrancepillois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Bensuo
Copy link
Collaborator Author

Bensuo commented Oct 24, 2023

Closing this now, further review can be carried out on the upstream PR here: intel#11596

@Bensuo Bensuo closed this Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Graph Implementation Related to DPC++ implementation and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants