Skip to content

Commit

Permalink
show grid size when there is an exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahdhn committed Jan 25, 2024
1 parent 31cceba commit 7f415a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libNeonSys/include/Neon/sys/devices/gpu/GpuDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7f415a5

Please sign in to comment.