From b25aed99524493890b093643a73cefb086818f66 Mon Sep 17 00:00:00 2001 From: Jade Abraham Date: Wed, 23 Aug 2023 08:56:40 -0700 Subject: [PATCH] add more gpu fixes Signed-off-by: Jade Abraham --- modules/standard/GPU.chpl | 4 ++-- test/gpu/native/studies/sort/radixSortGpu.chpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/standard/GPU.chpl b/modules/standard/GPU.chpl index d6ec08c4d3c8..e78c95977c2b 100644 --- a/modules/standard/GPU.chpl +++ b/modules/standard/GPU.chpl @@ -145,7 +145,7 @@ module GPU until completion of this asynchronous transfer */ @chpldoc.nodoc - proc asyncGpuComm(dstArr : ?t1, srcArr : ?t2) : GpuAsyncCommHandle + proc asyncGpuComm(ref dstArr : ?t1, srcArr : ?t2) : GpuAsyncCommHandle where isArrayType(t1) && isArrayType(t2) { extern proc chpl_gpu_comm_async(dstArr : c_ptr(void), srcArr : c_ptr(void), @@ -155,7 +155,7 @@ module GPU halt("Arrays passed to asyncGpuComm must have the same number of elements. ", "Sizes passed: ", dstArr.size, " and ", srcArr.size); } - return chpl_gpu_comm_async(c_ptrTo(dstArr), c_ptrTo(srcArr), + return chpl_gpu_comm_async(c_ptrTo(dstArr), c_ptrToConst(srcArr), dstArr.size * numBytes(dstArr.eltType)); } diff --git a/test/gpu/native/studies/sort/radixSortGpu.chpl b/test/gpu/native/studies/sort/radixSortGpu.chpl index 0e467cfc801d..2b9ef562fa31 100644 --- a/test/gpu/native/studies/sort/radixSortGpu.chpl +++ b/test/gpu/native/studies/sort/radixSortGpu.chpl @@ -137,7 +137,7 @@ module RadixSort { writeln("Pf sum: ",count); } - proc radixSort(inputArr: [] uint){ + proc radixSort(ref inputArr: [] uint){ if (noisy){ writeln("Bits at a time: ", bitsAtATime); writeln("Buckets: ", buckets);