mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-09 23:45:36 +00:00
Warning squash
This commit is contained in:
parent
d0b6593823
commit
9f40467e24
@ -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");
|
||||
|
@ -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 "<<used_t<<" free "<<free_t<< " total "<<total_t<<std::endl;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user