I implemented ray casting tool on CUDA. It calculates set of parameters for different orientations of model (tri mesh). Since all orientations are known in advance I implemented batch rendering. So, set of placements are processed in single kernel function call. And amount of work done by kernel function may be specified by such parameters as: ray casting resolution, batch size, amount of triangles in a model.
Ray casting resolution and batch size are affecting on kernel function grid size like this:
#define THREAD_W 2 #define THREAD_H 32 block = dim3(THREAD_W, THREAD_H, 1); grid = dim3(w*batchSize / block.x, h / block.y, 1);//w,h -- ray casting resolution (amount of rays = w*h)
All the code works fine. But if combination above mentioned parameters exceeds some value, application crashes. That causes reloading of driver. So if resolution and batch size are too high or model is too big I have a black screen and driver restarts. It seems that it happens because app runs out of some resource (probably memory or registers). :unsure:
So, please tell me, is there some way do get some information about that error and reason that causes it. Is there some way to know that I run out of memory and make an automatic overflow-check before calling kernel function.
GPU: GeForce GTX 260
OS: Win7 64bit
Kernel function data: Used 30 registers, 604+0 bytes lmem, 20+16 bytes smem, 24096 bytes cmem, 52 bytes cmem