From ec2536932cc02c39d9d06cdf67e0b1004355ab92 Mon Sep 17 00:00:00 2001 From: Nafees01 Date: Wed, 19 Aug 2026 00:56:11 -0600 Subject: [PATCH] cuda-ref: use cudaMemcpyAsync for QFunction context --- backends/cuda-ref/ceed-cuda-ref-qfunctioncontext.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/backends/cuda-ref/ceed-cuda-ref-qfunctioncontext.c b/backends/cuda-ref/ceed-cuda-ref-qfunctioncontext.c index e608cce9f3..437918e073 100644 --- a/backends/cuda-ref/ceed-cuda-ref-qfunctioncontext.c +++ b/backends/cuda-ref/ceed-cuda-ref-qfunctioncontext.c @@ -37,15 +37,7 @@ static inline int CeedQFunctionContextSyncH2D_Cuda(const CeedQFunctionContext ct impl->d_data = impl->d_data_owned; } - // Use async memcpy during CUDA Graph capture for compatibility - enum cudaStreamCaptureStatus capture_status; - - cudaStreamIsCapturing(cudaStreamPerThread, &capture_status); - if (capture_status != cudaStreamCaptureStatusNone) { - CeedCallCuda(ceed, cudaMemcpyAsync(impl->d_data, impl->h_data, ctx_size, cudaMemcpyHostToDevice, cudaStreamPerThread)); - } else { - 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)); CeedCallBackend(CeedDestroy(&ceed)); return CEED_ERROR_SUCCESS;