[Beignet] *** SPAM LEVEL 4.053 *** Re: [PATCH 2/3] CL: Support kernel side defined samplers.

Zhigang Gong zhigang.gong at linux.intel.com
Wed May 8 00:08:26 PDT 2013


> -----Original Message-----
> From:
> beignet-bounces+zhigang.gong=linux.intel.com at lists.freedesktop.org
> [mailto:beignet-bounces+zhigang.gong=linux.intel.com at lists.freedesktop.
> org] On Behalf Of Simon Richter
> Sent: Wednesday, May 08, 2013 2:11 PM
> To: beignet at lists.freedesktop.org
> Subject: [Beignet] *** SPAM LEVEL 4.053 *** Re: [PATCH 2/3] CL: Support
> kernel side defined samplers.
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 07.05.2013 08:45, Zhigang Gong wrote:
> 
> > We changed the way to handle samplers. We gather all the kernel side
> > defined samplers and those sampler in kernel argument into one
> > samplers array. And don't allocate one single sampler each time.
> 
> > +  /* Get sampler data & size */ +  k->sampler_sz =
> > gbe_kernel_get_sampler_size(k->opaque); +  k->arg_sampler_sz = 0; +
> > assert(k->sampler_sz <= GEN_MAX_SAMPLERS);
> 
> I keep hitting this assert directly on the first testcase
(test_create_kernel).
> 
> k->sampler_sz is 384 for me (IVB2 platform).
[Gong, Zhigang] Looks like the assertion is in function cl_kernel_setup,
It's very weird, as test_create_kernel() should not even call into
cl_kernel_setup(). (btw, this is also weird, as according to the function
name it should create a kernel)
Could you use gdb to excute it and tell me the back trace when it trigger
this assertion? And could you also tell me your system's environment, which
os distro, x86 or x64?

Here is the test case's source code:

#include "utest_helper.hpp"

static void test_create_kernel(void)
{
  cl_ulong max_mem_size;
  cl_int status;

  OCL_CALL(clGetDeviceInfo, device, CL_DEVICE_MAX_MEM_ALLOC_SIZE,
sizeof(max_mem_size), &max_mem_size, NULL);
  OCL_ASSERT(max_mem_size < (cl_ulong)-1);
  // increment the size so that following clCreateBuffer() would fail.
  ++max_mem_size;
  buf[0] = clCreateBuffer(ctx, 0, max_mem_size, NULL, &status);
  OCL_ASSERT(status == CL_INVALID_BUFFER_SIZE);
}

MAKE_UTEST_FROM_FUNCTION(test_create_kernel);
> 
>     Simon
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iJwEAQECAAYFAlGJ7FYACgkQ0sfeulffv7vKcQP/Zt78UKFXO2s5g6AIPAuFapjb
> taGeg56ZG7ZEo6cEe9dq7GsxW0VsMdzgg0CE4cNXYd0ubsgul07M4jmAmyL
> IJuhd
> /0M9JibctYb5Ev+E5gr8BzYGYmhpwfU9c4EZMh25NC71EWJMtUltTHpGEvhf
> eSdQ
> U6hvARlBd720Cu8nXrY=
> =76C9
> -----END PGP SIGNATURE-----
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet



More information about the Beignet mailing list