On Thu, Sep 25, 2014 at 9:47 PM, Tom Stellard <[email protected]> wrote:
> On Thu, Sep 25, 2014 at 09:18:18AM +0800, Zhigang Gong wrote:
>> On Wed, Sep 24, 2014 at 08:03:10AM -0700, Tom Stellard wrote:
>> > On Wed, Sep 24, 2014 at 01:13:18AM +0000, Luo, Xionghu wrote:
>> > > Hi Tom,
>> > > According to the opencl-1.2 spec in page 165, the option 
>> > > CL_KERNEL_GLOBAL_WORK_SIZE for clGetKernelWorkGroupInfo should call 
>> > > built in kernel or custom device.
>> > >
>> > > "This provides a mechanism for the
>> > > application to query the maximum global
>> > > size that can be used to execute a kernel
>> > > (i.e. global_work_size argument to
>> > > clEnqueueNDRangeKernel) on a custom
>> > > device given by device or a built-in kernel
>> > > on an OpenCL device given by device.
>> > > If device is not a custom device or kernel
>> > > is not a built-in kernel,
>> > > clGetKernelArgInfo returns the error
>> > > CL_INVALID_VALUE."
>> > >
>> > > And this case called dummy kernel instead of built in kernel, so the 
>> > > return value is not as expected, my patch could call built in kernel to 
>> > > test the correct return value of option CL_KERNEL_GLOBAL_WORK_SIZE.
>> > >
>> >
>> > I'm still confused by this patch, because the CL_KERNEL_GLOBAL_WORK_SIZE 
>> > enum
>> > value does not appear anywhere in this patch or in the file being patched.
>> Hi Tom,
>>
>> Please check the following code in the get-kernel-work-group-info.c:
>>
>>   const cl_kernel_work_group_info* kernel_work_group_infos =
>>     PIGLIT_CL_ENUM_ARRAY(cl_kernel_work_group_info);
>>
>> And the cl_kernel_work_group_info is defined as below in 
>> piglit-util-cl-enum.c as below:
>>
>>   PIGLIT_CL_DEFINE_ENUM_2(cl_kernel_work_group_info, 3, 5, 6) = {
>>       CL_KERNEL_WORK_GROUP_SIZE,
>>       CL_KERNEL_COMPILE_WORK_GROUP_SIZE,
>>       CL_KERNEL_LOCAL_MEM_SIZE,
>>   #ifdef CL_VERSION_1_1
>>       CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE,
>>       CL_KERNEL_PRIVATE_MEM_SIZE, // 5
>>   #endif //CL_VERSION_1_1
>>   #ifdef CL_VERSION_1_2
>>       CL_KERNEL_GLOBAL_WORK_SIZE,
>>   #endif //CL_VERSION_1_2
>>   };
>>   PIGLIT_CL_DEFINE_ENUM_PTR_2(cl_kernel_work_group_info);
>>
>> You can see the CL_KERNEL_GLOBAL_WORK_SIZE is the last element of that array 
>> when
>> CL_VERSION_1_2 is defined.
>>
>>
>
> OK, thanks for the explain.  The other question I had about the patch
> is: Won't it break the test for devices without builtin kernels?
>

You are right, we should not break the test when there is no built-in
kernel available.
Xionghu, please fix this and send a new version.

Thanks,
Zhigang Gong.
_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to