From 2b1e2594417c864fad48b101f661f41e7830ce26 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Thu, 4 Jun 2020 17:16:55 -0700 Subject: [PATCH] Decode of SYCL devices fix --- Grid/threads/Accelerator.cc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Grid/threads/Accelerator.cc b/Grid/threads/Accelerator.cc index 917c1c34..d049fd2f 100644 --- a/Grid/threads/Accelerator.cc +++ b/Grid/threads/Accelerator.cc @@ -36,7 +36,6 @@ void acceleratorInit(void) #define GPU_PROP_FMT(canMapHostMemory,FMT) printf("AcceleratorCudaInit: " #canMapHostMemory ": " FMT" \n",prop.canMapHostMemory); #define GPU_PROP(canMapHostMemory) GPU_PROP_FMT(canMapHostMemory,"%d"); - cudaGetDeviceProperties(&gpu_props[i], i); if ( world_rank == 0) { cudaDeviceProp prop; @@ -57,6 +56,8 @@ void acceleratorInit(void) } } MemoryManager::DeviceMaxBytes = (8*totalDeviceMem)/10; // Assume 80% ours +#undef GPU_PROP_FMT +#undef GPU_PROP #ifdef GRID_IBM_SUMMIT // IBM Jsrun makes cuda Device numbering screwy and not match rank @@ -117,6 +118,8 @@ void acceleratorInit(void) // GPU_PROP(singleToDoublePrecisionPerfRatio); } } +#undef GPU_PROP_FMT +#undef GPU_PROP #ifdef GRID_IBM_SUMMIT // IBM Jsrun makes cuda Device numbering screwy and not match rank if ( world_rank == 0 ) printf("AcceleratorHipInit: IBM Summit or similar - NOT setting device to node rank\n"); @@ -162,17 +165,18 @@ void acceleratorInit(void) for(int d = 0;d().c_str()); + printf("AcceleratorSyclInit: " #prop ": %s \n",devices[d].get_info().c_str()); #define GPU_PROP_FMT(prop,FMT) \ - printf("AcceleratorSyclInit: " #prop ": " FMT" \n",prop,devices[d].get_info()); + printf("AcceleratorSyclInit: " #prop ": " FMT" \n",devices[d].get_info()); -#define GPU_PROP(prop) GPU_PROP_FMT(prop,"%d"); +#define GPU_PROP(prop) GPU_PROP_FMT(prop,"%ld"); GPU_PROP_STR(vendor); GPU_PROP_STR(version); - GPU_PROP_STR(device_type); - GPU_PROP_STR(max_compute_units); + // GPU_PROP_STR(device_type); + /* + GPU_PROP(max_compute_units); GPU_PROP(native_vector_width_char); GPU_PROP(native_vector_width_short); GPU_PROP(native_vector_width_int); @@ -183,7 +187,8 @@ void acceleratorInit(void) GPU_PROP(address_bits); GPU_PROP(half_fp_config); GPU_PROP(single_fp_config); - GPU_PROP(double_fp_config); + */ + // GPU_PROP(double_fp_config); GPU_PROP(global_mem_size); }