From 937632ff39faa3d111144fc56cbc3bec62a5c46d Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 7 Nov 2024 14:15:46 -0800 Subject: [PATCH] Fix dBVH memcpy size (#1490) --- src/geocel/vg/detail/VecgeomSetup.cu | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/geocel/vg/detail/VecgeomSetup.cu b/src/geocel/vg/detail/VecgeomSetup.cu index dc0610b4e2..9b27014b3c 100644 --- a/src/geocel/vg/detail/VecgeomSetup.cu +++ b/src/geocel/vg/detail/VecgeomSetup.cu @@ -64,8 +64,11 @@ CudaPointers bvh_pointers_device() } // Copy from symbol using runtime API - CELER_CUDA_CALL(cudaMemcpyFromSymbol( - &result.symbol, vecgeom::cuda::dBVH, 1, 0, cudaMemcpyDeviceToHost)); + CELER_CUDA_CALL(cudaMemcpyFromSymbol(&result.symbol, + vecgeom::cuda::dBVH, + sizeof(vecgeom::cuda::dBVH), + 0, + cudaMemcpyDeviceToHost)); CELER_CUDA_CALL(cudaDeviceSynchronize()); return result;