opencl backend: avoid uninitialized cl_mem objects
We generated an if-guard around clCreateBuffer calls to ensure cl_mem
objects are created with a strictly positive size. Unfortunately, this
could leave some cl_mem objects uninitialized, causing later
clSetKernelArg calls to fail with error CL_INVALID_MEM_OBJECT. This may
happen for example when a kernel does not write to all of its buffers
for particular parameter values.
Instead, unconditionally call clCreateBuffer and ensure it can hold
at least one element using a max expression.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>