diff --git a/projects/hip/tests/src/hipMemcpy.cpp b/projects/hip/tests/src/hipMemcpy.cpp index 7dc8de8d2e..a27135907b 100644 --- a/projects/hip/tests/src/hipMemcpy.cpp +++ b/projects/hip/tests/src/hipMemcpy.cpp @@ -36,7 +36,7 @@ void printSep() // The subroutine allocates memory , copies to device, runs a vector add kernel, copies back, and checks the result. // // IN: numElements controls the number of elements used for allocations. -// IN: usePinnedHost : If true, allocate host with hipMallocHost and is pinned ; else allocate host memory with malloc. +// IN: usePinnedHost : If true, allocate host with hipHostAlloc and is pinned ; else allocate host memory with malloc. // IN: useHostToHost : If true, add an extra host-to-host copy. // IN: useDeviceToDevice : If true, add an extra deviceto-device copy after result is produced. // IN: useMemkindDefault : If true, use memkinddefault (runtime figures out direction). if false, use explicit memcpy direction. @@ -67,8 +67,8 @@ void memcpytest2(size_t numElements, bool usePinnedHost, bool useHostToHost, boo if (useHostToHost) { if (usePinnedHost) { - HIPCHECK ( hipMallocHost(&A_hh, sizeElements) ); - HIPCHECK ( hipMallocHost(&B_hh, sizeElements) ); + HIPCHECK ( hipHostAlloc((void**)&A_hh, sizeElements, hipHostAllocDefault) ); + HIPCHECK ( hipHostAlloc((void**)&B_hh, sizeElements, hipHostAllocDefault) ); } else { A_hh = (T*)malloc(sizeElements); B_hh = (T*)malloc(sizeElements); diff --git a/projects/hip/tests/src/hipMemcpyAsync.cpp b/projects/hip/tests/src/hipMemcpyAsync.cpp index 2254f9bdae..bf50f85bbb 100644 --- a/projects/hip/tests/src/hipMemcpyAsync.cpp +++ b/projects/hip/tests/src/hipMemcpyAsync.cpp @@ -33,7 +33,7 @@ void simpleNegTest() size_t Nbytes = N*sizeof(float); A_malloc = (float*)malloc(Nbytes); - HIPCHECK(hipMallocHost(&A_pinned, Nbytes)); + HIPCHECK(hipHostAlloc((void**)&A_pinned, Nbytes, hipHostAllocDefault)); HIPCHECK(hipMalloc(&A_d, Nbytes)); @@ -61,7 +61,7 @@ struct HostTraits static void *Alloc(size_t sizeBytes) { void *p; - HIPCHECK(hipMallocHost(&p, sizeBytes)); + HIPCHECK(hipHostAlloc((void**)&p, sizeBytes, hipHostAllocDefault)); return p; }; }; @@ -181,8 +181,8 @@ void test_manyInflightCopies(hipStream_t stream, int numElements, int numCopies, T *A_d; T *A_h1, *A_h2; - HIPCHECK(hipMallocHost(&A_h1, Nbytes)); - HIPCHECK(hipMallocHost(&A_h2, Nbytes)); + HIPCHECK(hipHostAlloc((void**)&A_h1, Nbytes, hipHostAllocDefault)); + HIPCHECK(hipHostAlloc((void**)&A_h2, Nbytes, hipHostAllocDefault)); HIPCHECK(hipMalloc(&A_d, Nbytes)); for (int i=0; i