Skip to content

cuda-gen: Add CUDA Graph capture and replay for composite operators - #2006

Open
jeremylt wants to merge 5 commits into
mainfrom
test/cuda-graph
Open

cuda-gen: Add CUDA Graph capture and replay for composite operators#2006
jeremylt wants to merge 5 commits into
mainfrom
test/cuda-graph

Conversation

@jeremylt

Copy link
Copy Markdown
Member

Squash of #1987 merged into staging branch for Noether testing. See original PR for discussion - this is only a testing branch

…1987)

* CUDA graph implemented

* Implement CUDA graphs with fallback system in libCEED

* Cleaner and Simplified Implementation of CUDA graph

* add vector pointer tracking to detect memory changes in Graph

* Add PETSc vector setup for CUDA Graph compatibility in CUDA-gen backend

* Clean CUDA-graph implementation

* Simple and clean implementation of CUDA graph but numerically incorrect

* per-operator CUDA Graph implementation

* replace cudaMemset with cudaMemsetAsync

* Auto-detect graph capture and use async memset with cudaStreamPerThread

* CUDA Graph support for composite operators in cuda-gen backend

* CUDA Graph is working fine for composite operators

* cuda-gen: CUDA Graph capture and replay working for composite operators

* style: apply clang-format-22

* cuda-gen: address review feedback for composite CUDA graphs

* cuda: add CeedOperatorSetEnableCudaGraph and address review feedback

* cuda: add docs for when graph/CUfunction setters aren't supported

* cuda-gen: add output pointer check and address review fixes

* cuda-gen: address review feedback for ceed handling and async memset

* address review feedback

* cuda: update CHANGELOG and fix style

* cuda-gen: apply clang-format-22
Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
Comment thread backends/cuda-ref/ceed-cuda-ref-qfunctioncontext.c Outdated
Comment thread backends/cuda-ref/ceed-cuda-ref-qfunctioncontext.c
}
CeedCallCuda(ceed, cudaMemcpy(impl->d_data, impl->h_data, ctx_size, cudaMemcpyHostToDevice));

CeedCallCuda(ceed, cudaMemcpyAsync(impl->d_data, impl->h_data, ctx_size, cudaMemcpyHostToDevice, cudaStreamPerThread));

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Does this change need to happen with the vector memory transfers to the device too? @Nafees01

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Also, is there a HIP equivalent @zatkins-dev

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