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

Add graph support #312

Merged
merged 22 commits into from
Feb 6, 2025
Merged

Add graph support #312

merged 22 commits into from
Feb 6, 2025

Conversation

matmanc
Copy link
Contributor

@matmanc matmanc commented Jan 24, 2025

CUDA Graph API seems a promising addition to the already existing cuda streams. Especially to mix host and device function in a complex order. Moreover, also HIP supports cuda graphs so it feels natural to extend cudawrappers to supports graph.

In this pull request the basic functionality of cuda graph api are introduced.

Clone and verify on a machine with an NVIDIA GPU

cd $(mktemp -d --tmpdir cudawrappers-XXXXXX)
git clone https://github.com/nlesc-recruit/cudawrappers .
git checkout <this-branch>
cmake -S . -B build -CD -DCUDAWRAPPERS_BUILD_TESTING=True
make -C build
make -C build format # Nothing should change
make -C build lint # linting is broken until we fix the issues (see #92)
build/tests/test_graph

Clone and verify on a machine with HIP and AMD GPU

git clone https://github.com/nlesc-recruit/cudawrappers .
git checkout <this-branch>
cmake -S . -B build -CD -DCUDAWRAPPERS_BUILD_TESTING=True -DCUDA_WRAPPERS_BACKEND_HIP=True
make -C build
make -C build format # Nothing should change
build/tests/test_graph

@matmanc matmanc force-pushed the add_graph_support_v2 branch from 7ae3ee0 to a83656c Compare January 24, 2025 12:36
Copy link
Contributor

@csbnw csbnw left a comment

Choose a reason for hiding this comment

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

Very nice addition to cudawrappers! I did a first pass over the changes and made some (minor) suggestions.

@matmanc matmanc self-assigned this Jan 27, 2025
@matmanc matmanc requested a review from csbnw February 5, 2025 09:09
@matmanc matmanc force-pushed the add_graph_support_v2 branch from dc18c36 to e122911 Compare February 5, 2025 12:37
@matmanc matmanc force-pushed the add_graph_support_v2 branch 2 times, most recently from c186666 to 28e4dfe Compare February 5, 2025 14:03
@matmanc matmanc force-pushed the add_graph_support_v2 branch from 28e4dfe to 4770e56 Compare February 5, 2025 14:11
@matmanc matmanc merged commit f582942 into main Feb 6, 2025
7 checks passed
@matmanc matmanc deleted the add_graph_support_v2 branch February 6, 2025 12:36
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.

None yet

4 participants