11/*
2- * Copyright (c) 2010-2024 The University of Tennessee and The University
2+ * Copyright (c) 2010-2025 The University of Tennessee and The University
33 * of Tennessee Research Foundation. All rights
44 * reserved.
55 * Copyright (c) 2024 NVIDIA Corporation. All rights reserved.
@@ -307,18 +307,18 @@ static void* parsec_cuda_find_incarnation(parsec_device_gpu_module_t* gpu_device
307307
308308static int parsec_cuda_set_device (parsec_device_gpu_module_t * gpu )
309309{
310- cudaError_t cudaStatus ;
310+ cudaError_t status ;
311311 parsec_device_cuda_module_t * cuda_device = (parsec_device_cuda_module_t * )gpu ;
312312
313- cudaStatus = cudaSetDevice (cuda_device -> cuda_index );
314- PARSEC_CUDA_CHECK_ERROR ( "cudaSetDevice" , cudaStatus , {return PARSEC_ERROR ;} );
313+ status = cudaSetDevice (cuda_device -> cuda_index );
314+ PARSEC_CUDA_CHECK_ERROR ( "cudaSetDevice" , status , {return PARSEC_ERROR ;} );
315315 return PARSEC_SUCCESS ;
316316}
317317
318318static int parsec_cuda_memcpy_async (struct parsec_device_gpu_module_s * gpu , struct parsec_gpu_exec_stream_s * gpu_stream ,
319319 void * dest , void * source , size_t bytes , parsec_device_transfer_direction_t direction )
320320{
321- cudaError_t cudaStatus ;
321+ cudaError_t status ;
322322 enum cudaMemcpyKind kind ;
323323 parsec_cuda_exec_stream_t * cuda_stream = (parsec_cuda_exec_stream_t * )gpu_stream ;
324324
@@ -338,45 +338,45 @@ static int parsec_cuda_memcpy_async(struct parsec_device_gpu_module_s *gpu, stru
338338 PARSEC_CUDA_CHECK_ERROR ( "Translate parsec_device_transfer_direction_t to cudaMemcpyKind" , cudaErrorInvalidValue , {return PARSEC_ERROR ;} );
339339 }
340340
341- cudaStatus = cudaMemcpyAsync ( dest , source , bytes , kind , cuda_stream -> cuda_stream );
342- PARSEC_CUDA_CHECK_ERROR ( "cudaMemcpyAsync" , cudaStatus , {return PARSEC_ERROR ;} );
341+ status = cudaMemcpyAsync ( dest , source , bytes , kind , cuda_stream -> cuda_stream );
342+ PARSEC_CUDA_CHECK_ERROR ( "cudaMemcpyAsync" , status , {return PARSEC_ERROR ;} );
343343 return PARSEC_SUCCESS ;
344344}
345345
346346static int parsec_cuda_event_record (struct parsec_device_gpu_module_s * gpu , struct parsec_gpu_exec_stream_s * gpu_stream , int32_t event_idx )
347347{
348348 parsec_cuda_exec_stream_t * cuda_stream = (parsec_cuda_exec_stream_t * )gpu_stream ;
349- cudaError_t cudaStatus ;
349+ cudaError_t status ;
350350 (void )gpu ;
351351
352- cudaStatus = cudaEventRecord (cuda_stream -> events [event_idx ], cuda_stream -> cuda_stream );
353- PARSEC_CUDA_CHECK_ERROR ( "cudaEventRecord" , cudaStatus , {return PARSEC_ERROR ;} );
352+ status = cudaEventRecord (cuda_stream -> events [event_idx ], cuda_stream -> cuda_stream );
353+ PARSEC_CUDA_CHECK_ERROR ( "cudaEventRecord" , status , {return PARSEC_ERROR ;} );
354354 return PARSEC_SUCCESS ;
355355}
356356
357357static int parsec_cuda_event_query (struct parsec_device_gpu_module_s * gpu , struct parsec_gpu_exec_stream_s * gpu_stream , int32_t event_idx )
358358{
359359 parsec_cuda_exec_stream_t * cuda_stream = (parsec_cuda_exec_stream_t * )gpu_stream ;
360- cudaError_t cudaStatus ;
360+ cudaError_t status ;
361361 (void )gpu ;
362362
363- cudaStatus = cudaEventQuery (cuda_stream -> events [event_idx ]);
364- if (cudaSuccess == cudaStatus ) {
363+ status = cudaEventQuery (cuda_stream -> events [event_idx ]);
364+ if (cudaSuccess == status ) {
365365 return 1 ;
366366 }
367- if (cudaErrorNotReady == cudaStatus ) {
367+ if (cudaErrorNotReady == status ) {
368368 return 0 ;
369369 }
370- PARSEC_CUDA_CHECK_ERROR ( "cudaEventQuery" , cudaStatus , {return PARSEC_ERROR ;} );
370+ PARSEC_CUDA_CHECK_ERROR ( "cudaEventQuery" , status , {return PARSEC_ERROR ;} );
371371 return PARSEC_ERROR ; /* should be unreachable */
372372}
373373
374374static int parsec_cuda_memory_info (struct parsec_device_gpu_module_s * gpu , size_t * free_mem , size_t * total_mem )
375375{
376- cudaError_t cudaStatus ;
376+ cudaError_t status ;
377377 (void )gpu ;
378- cudaStatus = cudaMemGetInfo (free_mem , total_mem );
379- PARSEC_CUDA_CHECK_ERROR ( "cudaMemGetInfo" , cudaStatus , {return PARSEC_ERROR ;});
378+ status = cudaMemGetInfo (free_mem , total_mem );
379+ PARSEC_CUDA_CHECK_ERROR ( "cudaMemGetInfo" , status , {return PARSEC_ERROR ;});
380380 /* sanity check: no more free memory than total memory
381381 * some hip devices on Frontier may report more free memory than is available */
382382 if (* free_mem > * total_mem ) {
@@ -387,19 +387,19 @@ static int parsec_cuda_memory_info(struct parsec_device_gpu_module_s *gpu, size_
387387
388388static int parsec_cuda_memory_allocate (struct parsec_device_gpu_module_s * gpu , size_t bytes , void * * addr )
389389{
390- cudaError_t cudaStatus ;
390+ cudaError_t status ;
391391 (void )gpu ;
392- cudaStatus = cudaMalloc (addr , bytes );
393- PARSEC_CUDA_CHECK_ERROR ( "cudaMalloc" , cudaStatus , {return PARSEC_ERROR ;});
392+ status = cudaMalloc (addr , bytes );
393+ PARSEC_CUDA_CHECK_ERROR ( "cudaMalloc" , status , {return PARSEC_ERROR ;});
394394 return PARSEC_SUCCESS ;
395395}
396396
397397static int parsec_cuda_memory_free (struct parsec_device_gpu_module_s * gpu , void * addr )
398398{
399- cudaError_t cudaStatus ;
399+ cudaError_t status ;
400400 (void )gpu ;
401- cudaStatus = cudaFree (addr );
402- PARSEC_CUDA_CHECK_ERROR ( "cudaFree" , cudaStatus , {return PARSEC_ERROR ;});
401+ status = cudaFree (addr );
402+ PARSEC_CUDA_CHECK_ERROR ( "cudaFree" , status , {return PARSEC_ERROR ;});
403403 return PARSEC_SUCCESS ;
404404}
405405
0 commit comments