Re: [Beignet] [PATCH] do constant folding for kernel struct args

2017-06-13 Thread Guo, Yejun
I just tried such kernel, and the generated GEN IR is INDIRECT_MOV, it has nothing to do with this patch. Thanks Yejun -Original Message- From: Yang, Rong R Sent: Tuesday, June 13, 2017 3:54 PM To: Guo, Yejun; Wang, Rander; Pan, Xiuli; beignet@lists.freedesktop.org Subject: RE:

[Beignet] [PATCH 1/2] Add test case for large 3D image with TILE_Y.

2017-06-13 Thread yan . wang
From: Yan Wang It will test aligned4 and aligned16 kernel for 3D image. Signed-off-by: Yan Wang --- utests/compiler_fill_large_image.cpp | 98 1 file changed, 98 insertions(+) diff --git

[Beignet] [PATCH 2/2] Use aligned16 and aligne4 kernel to copy for large 3D image with TILE_Y.

2017-06-13 Thread yan . wang
From: Yan Wang It is similar with 2D image for avoiding extended image width truncated. Signed-off-by: Yan Wang --- src/CMakeLists.txt | 2 + src/cl_context.h | 4 ++

Re: [Beignet] [PATCH] Fix libva examples build error

2017-06-13 Thread Pan, Xiuli
Ping. -Original Message- From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Xiuli Pan Sent: Friday, May 5, 2017 16:23 To: beignet@lists.freedesktop.org Cc: Pan, Xiuli Subject: [Beignet] [PATCH] Fix libva examples build error From: Pan Xiuli

Re: [Beignet] [PATCH 1/3] Backend: Add intel_reqd_sub_group_size support

2017-06-13 Thread Pan, Xiuli
The spec has required the subgroup size to be 8 or 16, and I think we may need to fail the build in some other place. -Original Message- From: Yang, Rong R Sent: Tuesday, June 13, 2017 16:44 To: Pan, Xiuli ; beignet@lists.freedesktop.org Cc: Pan, Xiuli

Re: [Beignet] [PATCH 3/3] Utset: Add test case for cl_intel_required_subgroup_size extension

2017-06-13 Thread Yang, Rong R
> -Original Message- > From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of > Xiuli Pan > Sent: Monday, June 5, 2017 16:28 > To: beignet@lists.freedesktop.org > Cc: Pan, Xiuli > Subject: [Beignet] [PATCH 3/3] Utset: Add test case for >

Re: [Beignet] [PATCH 2/3] Runtime: Add new API enums for cl_intel_required_subgroup_size extension

2017-06-13 Thread Yang, Rong R
Also need add the extension define to backend/src/libocl/include/ocl.h file. > -Original Message- > From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of > Xiuli Pan > Sent: Monday, June 5, 2017 16:28 > To: beignet@lists.freedesktop.org > Cc: Pan, Xiuli

Re: [Beignet] [PATCH 2/3] Runtime: Add new API enums for cl_intel_required_subgroup_size extension

2017-06-13 Thread Pan, Xiuli
Now we have no clang support this extension, I think we can add that in next LLVM support. -Original Message- From: Yang, Rong R Sent: Tuesday, June 13, 2017 16:41 To: Pan, Xiuli ; beignet@lists.freedesktop.org Cc: Pan, Xiuli Subject: RE:

[Beignet] [PATCH 4/5] add utest compiler_skip_check for extension cl_intel_device_side_avc_motion_estimation.

2017-06-13 Thread xionghu . luo
From: Luo Xionghu fix build warnings. Signed-off-by: Chuanbo Weng Signed-off-by: Xionghu Luo --- kernels/compiler_skip_check.cl | 53 utests/CMakeLists.txt | 1 + utests/compiler_skip_check.cpp |

[Beignet] [PATCH 3/5] add utest compiler_intra_prediction for extenstion cl_intel_device_side_avc_motion_estimation.

2017-06-13 Thread xionghu . luo
From: Luo Xionghu fix build warnings. Signed-off-by: Chuanbo Weng Signed-off-by: Xionghu Luo --- kernels/compiler_intra_prediction.cl | 91 +++ utests/CMakeLists.txt| 3 +-

[Beignet] [PATCH 5/5] add utest compiler_block_motion_estimate_intel for extension cl_intel_device_side_avc_motion_estimation.

2017-06-13 Thread xionghu . luo
From: Luo Xionghu fix build warnings. Signed-off-by: Chuanbo Weng Signed-off-by: Xionghu Luo --- kernels/compiler_block_motion_estimate_intel.cl | 76 utests/CMakeLists.txt | 1 +

[Beignet] [PATCH 1/5] Backend: Add intel_reqd_sub_group_size support

2017-06-13 Thread xionghu . luo
From: Pan Xiuli If we get intel_reqd_sub_group_size attribute from frontend then set it to backend. Signed-off-by: Pan Xiuli --- backend/src/backend/context.cpp | 6 +- backend/src/backend/gen_program.cpp | 28

Re: [Beignet] [PATCH] do constant folding for kernel struct args

2017-06-13 Thread Yang, Rong R
foldFunctionStructArgConstOffset is called before the lowerFunctionArguments. If foldFunctionStructArgConstOffset is wrong, the INDIRECT_MOV generated in lowerFunctionArguments also wrong. I afraid the following ir: BB2: LOADI %30, 4 Add %20, %10, %30//%10 is a struct argument MOV %22, %20

Re: [Beignet] [PATCH] do constant folding for kernel struct args

2017-06-13 Thread Yang, Rong R
Has you consider the value from two arguments case. For example: Struct s1{ int i, float4 f4; } Struct s2{ int i; short s; float4 f4; } __kernel void k(s1, s2, __global float *dst) { int gid = get_global_id(0); float4 *p; if (gid % 2) { p = } else {

Re: [Beignet] [PATCH 1/3] Backend: Add intel_reqd_sub_group_size support

2017-06-13 Thread Yang, Rong R
> -Original Message- > From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of > Xiuli Pan > Sent: Monday, June 5, 2017 16:28 > To: beignet@lists.freedesktop.org > Cc: Pan, Xiuli > Subject: [Beignet] [PATCH 1/3] Backend: Add

Re: [Beignet] [PATCH v5 7/7] Optimize clEnqueueWriteImageByKernel and clEnqueuReadImageByKernel.

2017-06-13 Thread Yang, Rong R
The patchset LGTM, pushed, thanks. > -Original Message- > From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of > yan.w...@linux.intel.com > Sent: Tuesday, June 13, 2017 15:46 > To: beignet@lists.freedesktop.org > Cc: Yan Wang > Subject:

Re: [Beignet] [PATCH 2/3] Runtime: Add new API enums for cl_intel_required_subgroup_size extension

2017-06-13 Thread Pan, Xiuli
Add with the next version macro. -Original Message- From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Pan, Xiuli Sent: Tuesday, June 13, 2017 17:06 To: Yang, Rong R ; beignet@lists.freedesktop.org Subject: Re: [Beignet] [PATCH 2/3] Runtime:

Re: [Beignet] [PATCH] do constant folding for kernel struct args

2017-06-13 Thread Guo, Yejun
In current implementation, only loadi and add are considered. In the example, since %22 is dst of MOV, it will not be recorded. It is recorded and so impacts the IR only if %22 is dst of ADD. -Original Message- From: Yang, Rong R Sent: Tuesday, June 13, 2017 4:59 PM To: Guo, Yejun;

[Beignet] [PATCH] Runtime: Add missing SKL deivce ID

2017-06-13 Thread Xiuli Pan
From: Pan Xiuli It seems we missed some newly added device ID for SKL. Signed-off-by: Pan Xiuli --- src/cl_device_data.h | 6 +- src/cl_device_id.c | 4 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/cl_device_data.h

Re: [Beignet] [PATCH] Fix libva examples build error

2017-06-13 Thread Luo, Xionghu
Need deinit submodules for existing projects, or else still failed to update libva repo. Another issue is "undefined reference to 'drm_intel_get_min_eu_in_pool' " Luo Xionghu Best Regards -Original Message- From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Pan,

[Beignet] [PATCH V4] backend: add global immediate optimization

2017-06-13 Thread rander.wang
there are some global immediates in global var list of LLVM. these imm can be integrated in instructions. for compiler_global_immediate_optimized test in utest, there are two global immediates: L0: MOV(1) %42<0>:UD : 0x0:UD

[Beignet] [PATCH] backend: refine the local copy propagation.

2017-06-13 Thread rander.wang
src modifier is not supported by some instructions. so return false when it exists. This fix piglit % failed Signed-off-by: rander.wang --- .../src/backend/gen_insn_selection_optimize.cpp| 32 ++ 1 file changed, 32

Re: [Beignet] [PATCH V2] backend: add global immediate optimization

2017-06-13 Thread Song, Ruiling
> -Original Message- > From: Wang, Rander > Sent: Tuesday, June 13, 2017 1:24 PM > To: Song, Ruiling ; beig...@freedesktop.org > Subject: RE: [Beignet] [PATCH V2] backend: add global immediate optimization > > > > -Original Message- > From: Song,

Re: [Beignet] [PATCH V2] backend: add global immediate optimization

2017-06-13 Thread Wang, Rander
Ok, I will refine my patch according to discussing Thank you! -Original Message- From: Song, Ruiling Sent: Tuesday, June 13, 2017 3:21 PM To: Wang, Rander ; beig...@freedesktop.org Subject: RE: [Beignet] [PATCH V2] backend: add global immediate optimization >

[Beignet] [PATCH v5 6/7] Fix bug of clEnqueueUnmapMemObjectForKernel and clEnqueueMapImageByKernel.

2017-06-13 Thread yan . wang
From: Yan Wang 1. Support wrrting data by mapping/unmapping mode. 2. Add mapping record logic. 3. Add clFinish to guarantee the kernel copying is finished. 4. Fix the error of calling clEnqueueMapImageByKernel. blocking_map and map_flags need be switched.

[Beignet] [PATCH v5 7/7] Optimize clEnqueueWriteImageByKernel and clEnqueuReadImageByKernel.

2017-06-13 Thread yan . wang
From: Yan Wang 1. Only copy the data by origin and region defined. 2. Add clFinish to guarantee the kernel copying is finished when blocking writing. Signed-off-by: Yan Wang --- src/cl_api_mem.c | 25 ++--- 1 file