[Beignet] [PATCH 2/2] utests: add a test to trigger cl_float3 bug in clSetKernelArg.

2014-11-05 Thread Ruiling Song
Signed-off-by: Ruiling Song --- kernels/set_kernel_arg.cl | 20 utests/CMakeLists.txt |1 + utests/runtime_set_kernel_arg.cpp | 30 ++ 3 files changed, 51 insertions(+) create mode 100644 kernels/set_kernel_arg.cl crea

[Beignet] [PATCH 1/2] GBE: Fix kernel argument size for vector3

2014-11-05 Thread Ruiling Song
per OpenCL Spec 1.2, see 6.1.5 Alignment of Types. For 3-component vector data types, the size of the data type is 4 * sizeof(component). Signed-off-by: Ruiling Song --- backend/src/llvm/llvm_gen_backend.cpp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/llvm/

Re: [Beignet] Fwd: clSetKernelArg CL_INVALID_ARG_SIZE error

2014-11-05 Thread Song, Ruiling
Yes, it is a beignet bug, OpenCL spec specifies sizeof(float3) same as sizeof(float4). So using sizeof(cl_float3) when you call clSetKernelArg is the right way. I will send a patch to fix it. From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Алексей Родионов Sent: Wednesd

Re: [Beignet] [PATCH] GBE: remove useless debug info.

2014-11-05 Thread Song, Ruiling
LGTM > -Original Message- > From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of > Zhigang Gong > Sent: Monday, November 03, 2014 4:28 PM > To: beignet@lists.freedesktop.org > Cc: Gong, Zhigang > Subject: [Beignet] [PATCH] GBE: remove useless debug info. > > This debu

Re: [Beignet] [PATCH 1/6] GBE: Support more instructions for constant expression handling.

2014-11-05 Thread Song, Ruiling
The patchset LGTM. Thank you Rebecca and Zhigang! > -Original Message- > From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of > Zhigang Gong > Sent: Wednesday, November 05, 2014 1:41 PM > To: beignet@lists.freedesktop.org > Cc: Gong, Zhigang > Subject: [Beignet] [PATCH

Re: [Beignet] [PATCH] GBE: fix a bool handling bug when SEL on a uniform bool variable.

2014-11-05 Thread Song, Ruiling
LGTM > -Original Message- > From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of > Zhigang Gong > Sent: Wednesday, November 05, 2014 4:04 PM > To: beignet@lists.freedesktop.org > Cc: Gong, Zhigang > Subject: [Beignet] [PATCH] GBE: fix a bool handling bug when SEL on a

[Beignet] [PATCH 3/3] add test for cl buffer created with CL_MEM_USE_HOST_PTR

2014-11-05 Thread Guo Yejun
Signed-off-by: Guo Yejun --- kernels/runtime_use_host_ptr_buffer.cl | 6 ++ utests/CMakeLists.txt | 6 ++ utests/runtime_use_host_ptr_buffer.cpp | 36 ++ 3 files changed, 48 insertions(+) create mode 100644 kernels/runtime_use_host_ptr_b

[Beignet] [PATCH 2/3] enable CL_DEVICE_HOST_UNIFIED_MEMORY so app can benefit from CL_MEM_USE_HOST_PTR

2014-11-05 Thread Guo Yejun
Signed-off-by: Guo Yejun --- src/cl_gt_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cl_gt_device.h b/src/cl_gt_device.h index 3cd54eb..1c0a9e6 100644 --- a/src/cl_gt_device.h +++ b/src/cl_gt_device.h @@ -60,7 +60,7 @@ .max_constant_buffer_size = 512 << 10, .m

[Beignet] [PATCH V2 1/3] support CL_MEM_USE_HOST_PTR with userptr for cl buffer

2014-11-05 Thread Guo Yejun
userptr is used to wrap a memory pointer (page aligned) supplied by user space into a buffer object accessed by GPU, and so no extra copy is needed. It is supported starting from linux kernel 3.16 and libdrm 2.4.58. This patch is originally finished by Zhenyu Wang , I did a little change and some

Re: [Beignet] constant expression bug Re: pow(n), erf(c), tgamma give wrong results

2014-11-05 Thread Rebecca N. Palmer
And it triggers some other bugs related to constant expression handling when run all unit test cases. I didn't see that when I ran the tests in 0.9.3 on IvyBridge M GT2 (only builtin_pow and builtin_tgamma failed, both due to the absolute error checking you've already fixed) but your patch says t

[Beignet] Fwd: clSetKernelArg CL_INVALID_ARG_SIZE error

2014-11-05 Thread Алексей Родионов
I have a kernel with float3 argument. In C++ code I use cl_float3 (which is actually cl_float4). When I call clSetKernelArg with 3rd argument sizeof(cl_float3) it gives me an error CL_INVALID_ARG_SIZE. If i use my own structure with just 3 floats - it works. With NVIDIA it works with cl_float3 just

Re: [Beignet] [PATCH] fix bswap kernel function type issue.

2014-11-05 Thread Zhigang Gong
LGTM, pushed, thanks. On Wed, Nov 05, 2014 at 11:10:40AM +0800, xionghu@intel.com wrote: > From: Luo Xionghu > > use MACRO to define the corresponding function. > > Signed-off-by: Luo Xionghu > --- > kernels/compiler_bswap.cl | 15 ++- > utests/compiler_bswap.cpp |4 ++--

Re: [Beignet] [PATCH] add building dependency GIT_SHA1

2014-11-05 Thread Zhigang Gong
LGTM, pushed, thanks. On Thu, Nov 06, 2014 at 07:47:18AM +0800, Meng Mengmeng wrote: > Signed-off-by: Meng Mengmeng > --- > src/CMakeLists.txt | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt > index 9e65856..fc5de89 100644 > --- a/src/CMakeLists.

Re: [Beignet] pow(n), erf(c), tgamma give wrong results

2014-11-05 Thread Zhigang Gong
On Wed, Nov 05, 2014 at 08:27:46AM +, Rebecca N. Palmer wrote: > (Referring to > https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=Fix-pow-erf-tgamma.patch;att=3;bug=768090 > ) > > >And it triggers some other bugs related to constant expression > >handling when run all unit test ca

[Beignet] [PATCH] GBE: fix a bool handling bug when SEL on a uniform bool variable.

2014-11-05 Thread Zhigang Gong
If a SEL uses a bool variable which is a uniform bool, even we can get a dag node within the same BB, we still need to set the externFlag bit. The reason is that we don't know how to generate a scalar physical flag. Signed-off-by: Zhigang Gong --- backend/src/backend/gen_insn_selection.cpp | 11

Re: [Beignet] pow(n), erf(c), tgamma give wrong results

2014-11-05 Thread Rebecca N. Palmer
(Referring to https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=Fix-pow-erf-tgamma.patch;att=3;bug=768090 ) And it triggers some other bugs related to constant expression handling when run all unit test cases. I didn't see that when I ran the tests in 0.9.3 on IvyBridge M GT2 (only

[Beignet] [PATCH] fix bswap kernel function type issue.

2014-11-05 Thread xionghu . luo
From: Luo Xionghu use MACRO to define the corresponding function. Signed-off-by: Luo Xionghu --- kernels/compiler_bswap.cl | 15 ++- utests/compiler_bswap.cpp |4 ++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/kernels/compiler_bswap.cl b/kernels/compiler