From b521b2eadbfe999f7e45889640628de0bf5f2bf4 Mon Sep 17 00:00:00 2001 From: --set Date: Wed, 5 Feb 2025 10:24:43 -0500 Subject: [PATCH] Fix build breaks, breakeventHtoDMemcpy.cu --- concurrency/breakevenHtoDMemcpy.cu | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/concurrency/breakevenHtoDMemcpy.cu b/concurrency/breakevenHtoDMemcpy.cu index 770da70..7d1bb1b 100644 --- a/concurrency/breakevenHtoDMemcpy.cu +++ b/concurrency/breakevenHtoDMemcpy.cu @@ -38,17 +38,13 @@ #include -#ifdef __HIPCC__ - -#endif - #include "chError.h" #include "chTimer.h" int main( int argc, char *argv[] ) { - hipError_t status; + cudaError_t status; int *deviceInt = 0; int *hostInt = 0; const int cIterations = 100000; @@ -62,7 +58,7 @@ main( int argc, char *argv[] ) chTimerTimestamp start, stop; cuda(Malloc( &deviceInt, numBytes ) ); - cuda(HostMalloc( (void **) &hostInt, numBytes, 0 ) ); + cuda(HostAlloc( (void **) &hostInt, numBytes, 0 ) ); for ( size_t byteCount = byteIncrement; byteCount <= numBytes; @@ -72,7 +68,7 @@ main( int argc, char *argv[] ) chTimerGetTime( &start ); for ( int i = 0; i < cIterations; i++ ) { cuda(MemcpyAsync( deviceInt, hostInt, byteCount, - hipMemcpyHostToDevice, NULL ) ); + cudaMemcpyHostToDevice, NULL ) ); } cuda(DeviceSynchronize() ); chTimerGetTime( &stop ); @@ -85,8 +81,8 @@ main( int argc, char *argv[] ) } - hipFree( deviceInt ); - hipHostFree( hostInt ); + cudaFree( deviceInt ); + cudaFreeHost( hostInt ); return 0; Error: printf( "Error performing allocation\n" );