It would be good if you copy code fragment.
what error you are getting?
also post your system information(Brook+ version, driver version, OS, 64 or 32 bit )
in case some-body is using 2D Scatter stream in kernel, we need to create a temporary linear CAL resource.
In case, CAL resource allocation fails for this linear buffer, we get this error.
One way to avoid creation of temporary linear stream is to use 1D scatter streams with size < 8192.
Originally posted by: genaganna
One way to avoid creation of temporary linear stream is to use 1D scatter streams with size < 8192.
By default, Brook+ stream declaration creates a tiled CAL resource. But, scatter stream usage requires temporary linear CAL resource for kernel execution. If enough memory is not available for this temporary buffer, this error occurs.
It is always better if temporary linear stream creation can be avoided both becuase of huge memory requirements and performance overhead.
What if I will use scatter stream of the same size but 1D, not 2D one ?
Will this prevent from temporary linear stream creation?
You should use a 128-bit data-type 1D stream of size < 8192 if you need to use scatter stream.
Another variant: if I will use 2 or 4 or 8 scatter streams with smaller size ?
Unfortunately, ATI Stream doesn't allow using more that one scatter stream in a kernel.
What if I will use non-scatter 2D array? What limitations exist for non-scatter 2D (or 1D) streams?
There are no constraint on regular output streams and no such temporary stream are created in that case.
Do same limitations as for scatter streams apply to gather streams?
Gather streams doesn't have any such limitaton. Scatter streams require a special linear buffer on hardware, gather streams doesn't have any such requirements.
And could you give some explanation please, why number of such errors increase when I add error checking for input stream (i.e. call error() on each input stream before kernel launch )? How error state checking of input influent on memory allocation for output stream ?
Brook+ doesn't create CAL buffers at the time of stream declaration, but it tries to delay the process of buffer allocation. Error checking forces buffer allocation in case it is not done already. That's why you might see these errors more frequently as with error checking you might have lesser memory available on hardware.
Brook+ too have suport for scatter buffers > 8192 * 16 byte. But, it has some overhead of data copying from linear CAL buffer to regular CAL buffer.
You can avoid this overhead if you use CAL.
Originally posted by: gaurav.garg
Brook+ too have suport for scatter buffers > 8192 * 16 byte.
Originally posted by: gaurav.garg Do same limitations as for scatter streams apply to gather streams?
Gather streams doesn't have any such limitaton. Scatter streams require a special linear buffer on hardware, gather streams doesn't have any such requirements.