From 7f415a50bec8abec243837e03b63eb863833c1c8 Mon Sep 17 00:00:00 2001 From: Ahmed Mahmoud Date: Thu, 25 Jan 2024 11:05:53 -0500 Subject: [PATCH] show grid size when there is an exception --- libNeonSys/include/Neon/sys/devices/gpu/GpuDevice.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libNeonSys/include/Neon/sys/devices/gpu/GpuDevice.h b/libNeonSys/include/Neon/sys/devices/gpu/GpuDevice.h index 80cdbbe9..ac5cc97a 100644 --- a/libNeonSys/include/Neon/sys/devices/gpu/GpuDevice.h +++ b/libNeonSys/include/Neon/sys/devices/gpu/GpuDevice.h @@ -182,6 +182,7 @@ class GpuDevice : public DeviceInterface exc << "\n Kernel requires " << func_attr.sharedSizeBytes << " bytes of static shared memory"; exc << "\n Kernel requires " << func_attr.constSizeBytes << " bytes of user-allocated constant memory"; exc << "\n Kernel requires " << func_attr.localSizeBytes << " bytes of local memory per thread"; + exc << "\n Kernel grid size is " << cudaGrid.x << " x " << cudaGrid.y << " x " << cudaGrid.z; exc << "\n Kernel maximum thread/block is " << func_attr.maxThreadsPerBlock << " while launched block is " << cudaBlock.x * cudaBlock.y * cudaBlock.z; exc << "\n Kernel maximum dynamic shared memory is " << func_attr.maxDynamicSharedSizeBytes << " bytes while launched dynamic shared memory is " << shrMemSize << "bytes\n"; NEON_THROW(exc);