From 9f40467e2488c66b697df64a606ce82da9894e99 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Tue, 27 Feb 2024 11:40:36 -0500 Subject: [PATCH] Warning squash --- Grid/threads/Accelerator.cc | 12 ++++++------ Grid/threads/Accelerator.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Grid/threads/Accelerator.cc b/Grid/threads/Accelerator.cc index 70f469b0..be6efe93 100644 --- a/Grid/threads/Accelerator.cc +++ b/Grid/threads/Accelerator.cc @@ -120,7 +120,7 @@ hipStream_t computeStream; void acceleratorInit(void) { int nDevices = 1; - hipGetDeviceCount(&nDevices); + auto discard = hipGetDeviceCount(&nDevices); gpu_props = new hipDeviceProp_t[nDevices]; char * localRankStr = NULL; @@ -147,7 +147,7 @@ void acceleratorInit(void) #define GPU_PROP_FMT(canMapHostMemory,FMT) printf("AcceleratorHipInit: " #canMapHostMemory ": " FMT" \n",prop.canMapHostMemory); #define GPU_PROP(canMapHostMemory) GPU_PROP_FMT(canMapHostMemory,"%d"); - hipGetDeviceProperties(&gpu_props[i], i); + discard = hipGetDeviceProperties(&gpu_props[i], i); hipDeviceProp_t prop; prop = gpu_props[i]; totalDeviceMem = prop.totalGlobalMem; @@ -184,13 +184,13 @@ void acceleratorInit(void) } int device = rank; #endif - hipSetDevice(device); - hipStreamCreate(©Stream); - hipStreamCreate(&computeStream); + discard = hipSetDevice(device); + discard = hipStreamCreate(©Stream); + discard = hipStreamCreate(&computeStream); const int len=64; char busid[len]; if( rank == world_rank ) { - hipDeviceGetPCIBusId(busid, len, device); + discard = hipDeviceGetPCIBusId(busid, len, device); printf("local rank %d device %d bus id: %s\n", rank, device, busid); } if ( world_rank == 0 ) printf("AcceleratorHipInit: ================================================\n"); diff --git a/Grid/threads/Accelerator.h b/Grid/threads/Accelerator.h index d26f261e..66ceb269 100644 --- a/Grid/threads/Accelerator.h +++ b/Grid/threads/Accelerator.h @@ -397,7 +397,7 @@ NAMESPACE_BEGIN(Grid); inline void acceleratorMem(void) { size_t free_t,total_t,used_t; - hipMemGetInfo(&free_t,&total_t); + auto discard = hipMemGetInfo(&free_t,&total_t); used_t=total_t-free_t; std::cout << " MemoryManager : GPU used "<