[Beignet] [PATCH 2/3] add basic structure for selection IR optimization

2015-09-06 Thread Guo Yejun
v variable OCL_OPTIMIZE_SEL_IR Signed-off-by: Guo Yejun --- backend/src/CMakeLists.txt | 1 + backend/src/backend/gen_context.cpp| 3 + backend/src/backend/gen_insn_selection.cpp | 1 + backend/src/backend/gen_insn_selection.hpp | 5 ++ .../s

Re: [Beignet] [PATCH] add basic function to dump Selection IR

2015-09-06 Thread Guo, Yejun
Please ignore this patch, I did some minor changes and will re-send together with other patches. -Original Message- From: Guo, Yejun Sent: Monday, August 31, 2015 8:41 AM To: beignet@lists.freedesktop.org Cc: Guo, Yejun Subject: [PATCH] add basic function to dump Selection IR Selection

Re: [Beignet] [PATCH 2/4] add extensions intel_accelerator and basic intel_motion_estimation

2015-09-06 Thread Guo, Yejun
cate of code in check_op1_extension()?", yes, it is a duplicate code, will be removed in v2. For others, Chuanbo will refine and send out the v2 patch. -Original Message- From: Song, Ruiling Sent: Sunday, September 06, 2015 3:02 PM To: Weng, Chuanbo; beignet@lists.freedesktop.org Cc: Guo,

[Beignet] [PATCH] add basic function to dump Selection IR

2015-08-31 Thread Guo Yejun
Selection IR is a representation between Gen IR and Gen ASM, it is almost a Gen instruction but *before* the register allocation. only basic dump supported, not fully completed yet. Signed-off-by: Guo Yejun --- backend/src/CMakeLists.txt| 2 + backend/src/backend

Re: [Beignet] [patch v2 2/3] enable create image 2d from buffer in clCreateImage.

2015-08-30 Thread Guo, Yejun
4 comments inline, thanks. -Original Message- From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of xionghu@intel.com Sent: Friday, August 28, 2015 3:52 PM To: beignet@lists.freedesktop.org Cc: Luo, Xionghu Subject: [Beignet] [patch v2 2/3] enable create image 2d f

[Beignet] [PATCH] generate MOV instruction at selection stage when do simd_shuffle with imm value.

2015-08-27 Thread Guo Yejun
the earlier the instruction is generated, the more possible optimization could be applied. Signed-off-by: Guo Yejun --- backend/src/backend/gen8_context.cpp | 22 ++ backend/src/backend/gen_context.cpp| 46 +- backend/src/backend

[Beignet] [PATCH] correct simd width when dst of simd_shuffle is scalar

2015-08-25 Thread Guo Yejun
originally, the dst of simd_shuffle is not uniform, but if it is optimized as scalar, just use simd_width=1 to generate sel_op/asm Signed-off-by: Guo Yejun --- backend/src/backend/gen_insn_selection.cpp | 5 + 1 file changed, 5 insertions(+) diff --git a/backend/src/backend

[Beignet] [PATCH V2] remove GBE_CURBE_STACK_POINTER in payload

2015-08-24 Thread Guo Yejun
initialize the data inside kernel with packed integer vector V2: call functions from ctx, instead of ctx.registerAllocator Signed-off-by: Guo Yejun --- backend/src/backend/context.cpp| 10 - backend/src/backend/context.hpp| 2 +- backend/src/backend

Re: [Beignet] [PATCH] remove GBE_CURBE_STACK_POINTER in payload

2015-08-24 Thread Guo, Yejun
5:00 PM To: Guo, Yejun; beignet@lists.freedesktop.org Cc: Guo, Yejun Subject: RE: [Beignet] [PATCH] remove GBE_CURBE_STACK_POINTER in payload Some comments. > -Original Message- > From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf > Of Guo Yejun > Sent:

Re: [Beignet] [PATCH 1/3] backend/src/backend: Handle -dump-opt-llvm=[PATH] in clCompileProgram and clBuildProgram OpenCL API

2015-08-20 Thread Guo, Yejun
LGTM, thanks. -Original Message- From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Manasi Navare Sent: Tuesday, August 18, 2015 7:17 PM To: beignet@lists.freedesktop.org Cc: Navare, Manasi D Subject: [Beignet] [PATCH 1/3] backend/src/backend: Handle -dump-opt-llvm

[Beignet] [PATCH] fix issue when build against llvm3.4

2015-08-17 Thread Guo Yejun
the defines inside 'enum OpenFlags' changed from llvm 3.4 to 3.5, since we are creating a file for write, just use llvm::sys::fs::F_None which is defined by both 3.4 and 3.5 also change the flag to F_None for llvm3.6, since the it is not necessary to use F_RW. Signed-off-by:

Re: [Beignet] [PATCH] backend/src/backend: Handle -dump-opt-llvm=[PATH] in clCompileProgram OpenCL API

2015-08-13 Thread Guo, Yejun
Hi Manasi, Please refer to the patch I sent yesterday to handle LLVM 3.3. We'd use '0' instead of ' llvm::sys::fs::F_RW' for LLVM3.3, thanks. -Original Message- From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Manasi Navare Sent: Thursday, August 13, 2015 8:59 P

[Beignet] [PATCH] remove GBE_CURBE_STACK_POINTER in payload

2015-08-13 Thread Guo Yejun
initialize the data inside kernel with packed integer vector Signed-off-by: Guo Yejun --- backend/src/backend/context.cpp| 66 ++ backend/src/backend/context.hpp| 61 ++- backend/src/backend/gen75_context.cpp | 4

Re: [Beignet] [PATCH] Set proper Vendor ID

2015-08-12 Thread Guo, Yejun
LGTM, thanks. -Original Message- From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Midhun Kodiyath Sent: Monday, August 10, 2015 11:35 PM To: beignet@lists.freedesktop.org Cc: Kodiyath, Midhunchandra Subject: [Beignet] [PATCH] Set proper Vendor ID Device ID and ve

[Beignet] [PATCH V2] fix issue when build against llvm3.3

2015-08-12 Thread Guo Yejun
llvm 3.3 has a different constructure of llvm::raw_fd_ostream V2: refine the code Signed-off-by: Guo Yejun --- backend/src/backend/program.cpp | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp index

Re: [Beignet] [PATCH] fix issue when build against llvm3.3

2015-08-12 Thread Guo, Yejun
Sure, let me send v2 for this style. -Original Message- From: Song, Ruiling Sent: Thursday, August 13, 2015 9:57 AM To: Guo, Yejun; beignet@lists.freedesktop.org Cc: Guo, Yejun Subject: RE: [Beignet] [PATCH] fix issue when build against llvm3.3 > -Original Message- >

[Beignet] [PATCH] fix issue when build against llvm3.3

2015-08-12 Thread Guo Yejun
llvm 3.3 has a different constructure of llvm::raw_fd_ostream Signed-off-by: Guo Yejun --- backend/src/backend/program.cpp | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp index 9caf1ac..5f4277a

[Beignet] [PATCH V2] generate sub_group_id inside kernel instead of payload

2015-08-10 Thread Guo Yejun
get_sub_group_id ranges at [0, 7] for SIMD8 and [0, 15] for SIMD16, previously we set up the values in kernel payload, now change it to generate the values inside kernel with packed integer vector. v2: encapsulate into a function so that others can get the lane id easily. Signed-off-by: Guo Yejun

Re: [Beignet] [PATCH] generate sub_group_id inside kernel instead of payload

2015-08-09 Thread Guo, Yejun
The sel.push()/pop() is already at the beginning/end of the function, shall I add it again? Btw, I plan to encapsulate into a function so that others can get the lane id easily. -Original Message- From: Yang, Rong R Sent: Monday, August 10, 2015 11:37 AM To: Guo, Yejun; beignet

[Beignet] [PATCH] generate sub_group_id inside kernel instead of payload

2015-08-07 Thread Guo Yejun
get_sub_group_id ranges at [0, 7] for SIMD8 and [0, 15] for SIMD16, previously we set up the values in kernel payload, now change it to generate the values inside kernel with packed integer vector. Signed-off-by: Guo Yejun --- backend/src/backend/gen_context.cpp| 8 backend

Re: [Beignet] [PATCH] do not force float for immediate value load

2015-08-05 Thread Guo, Yejun
Yes, thanks. -Original Message- From: Song, Ruiling Sent: Thursday, August 06, 2015 11:00 AM To: Guo, Yejun; beignet@lists.freedesktop.org Cc: Guo, Yejun Subject: RE: [Beignet] [PATCH] do not force float for immediate value load The patch LGTM. But I think below description is a little

[Beignet] [PATCH] do not force float for immediate value load

2015-08-05 Thread Guo Yejun
float format is used to load immediate value with TYPE_U32/TYPE_S32, actually it is not necessary since it is not a performance sensitive point. Signed-off-by: Guo Yejun --- backend/src/backend/gen_insn_selection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

Re: [Beignet] [PATCH] output float immediate value with %f instead of %g

2015-08-03 Thread Guo, Yejun
Got it, thanks. The ASM is outputted for human reading, it is expected that a correct and human readable format is used. -Original Message- From: Song, Ruiling Sent: Tuesday, August 04, 2015 12:41 PM To: Guo, Yejun; beignet@lists.freedesktop.org Subject: RE: [Beignet] [PATCH] output

Re: [Beignet] [PATCH] output float immediate value with %f instead of %g

2015-08-03 Thread Guo, Yejun
Yes, it would be better, not sure why the current code generates "F" for the mov instruction, I'll take a look. -Original Message- From: Song, Ruiling Sent: Tuesday, August 04, 2015 10:45 AM To: Guo, Yejun; beignet@lists.freedesktop.org Subject: RE: [Beignet] [PATC

Re: [Beignet] [PATCH] output float immediate value with %f instead of %g

2015-08-01 Thread Guo, Yejun
value). And, to get the exact value of aaa (with real format uint), the hex format is a necessary. -Original Message- From: Song, Ruiling Sent: Friday, July 31, 2015 4:02 PM To: Guo, Yejun; beignet@lists.freedesktop.org Subject: RE: [Beignet] [PATCH] output float immediate value with %f i

Re: [Beignet] [PATCH] output float immediate value with %f instead of %g

2015-07-30 Thread Guo, Yejun
Ping for review, thanks. -Original Message- From: Guo, Yejun Sent: Thursday, July 23, 2015 8:48 AM To: beignet@lists.freedesktop.org Cc: Guo, Yejun Subject: [PATCH] output float immediate value with %f instead of %g In disassemble, a float immediate value is printf with %g, it outputs a

[Beignet] [PATCH] output float immediate value with %f instead of %g

2015-07-23 Thread Guo Yejun
In disassemble, a float immediate value is printf with %g, it outputs a wrong value with 8 bytes, change it to be %f with the correct 4 bytes. At some cases, the real data type is not float, so also print the value in hex format. Signed-off-by: Guo Yejun --- backend/src/backend/gen

[Beignet] [PATCH V3] Use a separate pattern for simd shuffle instead of binary pattern

2015-07-17 Thread Guo Yejun
SimdShuffleInstruction::wellFormed set dag.child[0]->root = 1 Signed-off-by: Guo Yejun --- backend/src/backend/gen8_context.cpp | 38 ++-- backend/src/backend/gen8_context.hpp | 1 + backend/src/backend/gen_context.cpp|

[Beignet] [PATCH V2] Use a separate pattern for simd shuffle instead of binary pattern

2015-07-16 Thread Guo Yejun
: Guo Yejun --- backend/src/backend/gen8_context.cpp | 38 ++-- backend/src/backend/gen8_context.hpp | 1 + backend/src/backend/gen_context.cpp| 68 -- backend/src/backend/gen_context.hpp| 1 + .../src

[Beignet] [PATCH] Use a separate pattern for simd shuffle instead of binary pattern

2015-07-15 Thread Guo Yejun
the binary pattern assumes the two src operands have the same type, while simd shuffle is not the case, so add a separate pattern for it. Signed-off-by: Guo Yejun --- backend/src/backend/gen8_context.cpp | 38 ++-- backend/src/backend/gen8_context.hpp | 1

[Beignet] [PATCH] enable CL_UNSIGNED_INT8 for CL_RG to fix regression

2015-07-01 Thread Guo Yejun
the regression is caused when only enable CL_UNORM_INT8 for CL_RG, the reason is that during the image copy implementation with internal kernel, all formats are considerd as integer format, it becomes unknown since CL_UNSIGNED_INT8 is not enabled yet. Signed-off-by: Guo Yejun --- src/cl_image.c

[Beignet] [PATCH] enable CL_RG + CL_UNORM_INT8 for image

2015-06-15 Thread Guo Yejun
Signed-off-by: Guo Yejun --- src/cl_image.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/cl_image.c b/src/cl_image.c index 9907f90..3a4be82 100644 --- a/src/cl_image.c +++ b/src/cl_image.c @@ -134,6 +134,11 @@ cl_image_get_intel_format(const cl_image_format *fmt) case

Re: [Beignet] [PATCH] correct the src output of alu3 when OCL_OUTPUT_ASM=1

2015-05-13 Thread Guo, Yejun
Ping for review, thanks. -Original Message- From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Guo Yejun Sent: Monday, May 04, 2015 4:47 PM To: beignet@lists.freedesktop.org Cc: Guo, Yejun Subject: [Beignet] [PATCH] correct the src output of alu3 when

[Beignet] [PATCH V2 3/4] add utest for intel_sub_group_shuffle

2015-05-12 Thread Guo Yejun
v2: correct kernel to be suitable for simd_width both 8 and 16 Signed-off-by: Guo Yejun --- kernels/compiler_sub_group_shuffle.cl | 18 ++ utests/compiler_sub_group_shuffle.cpp | 45 +++ 2 files changed, 63 insertions(+) create mode 100644 kernels

[Beignet] [PATCH 4/4] rename __gen_ocl_simd_any/all to sub_group_any/all

2015-05-12 Thread Guo Yejun
it is defined in https://www.khronos.org/registry/cl/extensions/intel/cl_intel_subgroups.txt Signed-off-by: Guo Yejun --- backend/src/backend/gen_insn_selection.cpp | 2 ++ backend/src/libocl/include/ocl_misc.h | 8 -- backend/src/libocl/tmpl/ocl_simd.tmpl.h| 2 ++ backend/src

[Beignet] [PATCH 3/4] add utest for intel_sub_group_shuffle

2015-05-12 Thread Guo Yejun
Signed-off-by: Guo Yejun --- kernels/compiler_sub_group_shuffle.cl | 18 ++ utests/compiler_sub_group_shuffle.cpp | 45 +++ 2 files changed, 63 insertions(+) create mode 100644 kernels/compiler_sub_group_shuffle.cl create mode 100644 utests

Re: [Beignet] [PATCH 2/2] add utest for intel_sub_group_shuffle

2015-05-12 Thread Guo, Yejun
Please ignore this patch set, I'll send a new patch set, thanks. -Original Message- From: Guo, Yejun Sent: Tuesday, May 12, 2015 1:34 PM To: beignet@lists.freedesktop.org Cc: Guo, Yejun Subject: [PATCH 2/2] add utest for intel_sub_group_shuffle Signed-off-by: Guo Yejun --- ke

[Beignet] [PATCH 2/4] add sub group functions intel_sub_group_shuffle

2015-05-12 Thread Guo Yejun
-off-by: Guo Yejun --- backend/src/backend/gen8_context.cpp | 23 ++--- backend/src/backend/gen_context.cpp| 32 ++ backend/src/backend/gen_insn_selection.cpp | 12 +++ backend/src/backend/gen_insn_selection.hxx | 1 + backend/src

[Beignet] [PATCH 1/4] rename __gen_ocl_get_simd_id/size to get_sub_group_id/size

2015-05-12 Thread Guo Yejun
Signed-off-by: Guo Yejun --- backend/src/libocl/tmpl/ocl_simd.tmpl.h| 8 ++-- backend/src/llvm/llvm_gen_ocl_function.hxx | 5 +++-- kernels/compiler_get_simd_id.cl| 8 kernels/compiler_get_simd_size.cl | 5 - kernels/compiler_get_sub_group_id.cl

[Beignet] [PATCH 2/2] add utest for intel_sub_group_shuffle

2015-05-11 Thread Guo Yejun
Signed-off-by: Guo Yejun --- kernels/compiler_sub_group_shuffle.cl | 15 utests/CMakeLists.txt | 3 ++- utests/compiler_sub_group_shuffle.cpp | 44 +++ 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 kernels

[Beignet] [PATCH 1/2] add simd sub group functions intel_sub_group_shuffle

2015-05-11 Thread Guo Yejun
-off-by: Guo Yejun --- backend/src/backend/gen8_context.cpp | 23 ++--- backend/src/backend/gen_context.cpp| 32 ++ backend/src/backend/gen_insn_selection.cpp | 12 +++ backend/src/backend/gen_insn_selection.hxx | 1 + backend/src

Re: [Beignet] [PATCH] add introduction to build Beignet with yocto

2015-05-11 Thread Guo, Yejun
, 2015 8:01 AM To: Guo, Yejun Cc: beignet@lists.freedesktop.org Subject: Re: [Beignet] [PATCH] add introduction to build Beignet with yocto Yejun thanks for the patch. It looks good, but it's better to get some one help to test this method on Yocto. On Mon, May 11, 2015 at 01:53:49PM +0800

[Beignet] [PATCH] add introduction to build Beignet with yocto

2015-05-10 Thread Guo Yejun
Signed-off-by: Guo Yejun --- docs/Beignet.mdwn| 2 +- docs/howto/cross-compiler-howto.mdwn | 75 ++-- 2 files changed, 73 insertions(+), 4 deletions(-) diff --git a/docs/Beignet.mdwn b/docs/Beignet.mdwn index 90a00e5..ec528b5 100644 --- a

Re: [Beignet] "utest_run -c runtime_use_host_ptr_buffer" failed to release test userptr object! [Append]

2015-05-06 Thread Guo, Yejun
It is a message from libdrm, what’s your exact version of libdrm and linux kernel? I did not see this message at my Ubuntu14.04 64bit system with libdrm 2.4.58 (built from source) and linux kernel 3.19 (download from kernel.org) From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Be

Re: [Beignet] Shared Host Memory but not Share

2015-05-04 Thread Guo, Yejun
point inside beignet (built with Debug version) From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Gao, Sanshan Sent: Monday, May 04, 2015 6:05 PM To: Guo, Yejun Cc: beignet@lists.freedesktop.org Subject: Re: [Beignet] Shared Host Memory but not Share Thanks for your

[Beignet] [PATCH] correct the src output of alu3 when OCL_OUTPUT_ASM=1

2015-05-04 Thread Guo Yejun
Signed-off-by: Guo Yejun --- backend/src/backend/gen/gen_mesa_disasm.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/backend/src/backend/gen/gen_mesa_disasm.c b/backend/src/backend/gen/gen_mesa_disasm.c index f8d89e0..705f5e2 100644 --- a/backend/src

Re: [Beignet] Shared Host Memory but not Share

2015-05-03 Thread Guo, Yejun
Please refer to the sample code in utests/runtime_use_host_ptr_buffer.cpp and kernels/runtime_use_host_ptr_buffer.cl To avoid internal copy, it requires libdrm version >= 2.4.58 and linux kernel version >= 3.16 From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Gao, San

[Beignet] [PATCH 2/2] add utest for __gen_ocl_simd_shuffle

2015-04-23 Thread Guo Yejun
Signed-off-by: Guo Yejun --- kernels/compiler_simd_shuffle.cl | 15 ++ utests/CMakeLists.txt| 3 ++- utests/compiler_simd_shuffle.cpp | 44 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 kernels

[Beignet] [PATCH 1/2] add simd level function __gen_ocl_simd_shuffle

2015-04-23 Thread Guo Yejun
-by: Guo Yejun --- backend/src/backend/gen8_context.cpp | 23 ++--- backend/src/backend/gen_context.cpp| 32 ++ backend/src/backend/gen_insn_selection.cpp | 12 +++ backend/src/backend/gen_insn_selection.hxx | 1 + backend/src/ir

[Beignet] [PATCH 2/2] add utest for __gen_ocl_get_simd_id

2015-04-20 Thread Guo Yejun
Signed-off-by: Guo Yejun --- kernels/compiler_get_simd_id.cl | 8 utests/CMakeLists.txt | 3 ++- utests/compiler_get_simd_id.cpp | 33 + 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 kernels/compiler_get_simd_id.cl

[Beignet] [PATCH V3 1/2] add simd level function __gen_ocl_get_simd_id

2015-04-20 Thread Guo Yejun
uint __gen_ocl_get_simd_id(); return value ranges from 0 to simdsize - 1 V2: use function sel.selReg to refine code V3: correct the uniform condition in liveness.cpp Signed-off-by: Guo Yejun --- backend/src/backend/gen_context.cpp| 9 - backend/src/backend/gen_insn_selection.cpp

Re: [Beignet] [PATCH V2 1/2] add simd level function __gen_ocl_get_simd_id

2015-04-20 Thread Guo, Yejun
Please ignore this patch set because just found a performance issue caused by the change in liveness.cpp -Original Message- From: Guo, Yejun Sent: Monday, April 20, 2015 9:28 AM To: Yang, Rong R; beignet@lists.freedesktop.org Subject: RE: [Beignet] [PATCH V2 1/2] add simd level

Re: [Beignet] [PATCH V2 1/2] add simd level function __gen_ocl_get_simd_id

2015-04-19 Thread Guo, Yejun
-Original Message- From: Yang, Rong R Sent: Friday, April 17, 2015 5:12 PM To: Guo, Yejun; beignet@lists.freedesktop.org Cc: Guo, Yejun Subject: RE: [Beignet] [PATCH V2 1/2] add simd level function __gen_ocl_get_simd_id > -Original Message- > From: Beignet [mailto:b

[Beignet] [PATCH V2 1/2] add simd level function __gen_ocl_get_simd_id

2015-04-16 Thread Guo Yejun
uint __gen_ocl_get_simd_id(); return value ranges from 0 to simdsize - 1 V2: use function sel.selReg to refine code Signed-off-by: Guo Yejun --- backend/src/backend/gen_context.cpp| 9 - backend/src/backend/gen_insn_selection.cpp | 6 ++ backend/src/backend/program.h

[Beignet] [PATCH 2/2] add utest for __gen_ocl_get_simd_id

2015-04-15 Thread Guo Yejun
Signed-off-by: Guo Yejun --- kernels/compiler_get_simd_id.cl | 8 utests/CMakeLists.txt | 3 ++- utests/compiler_get_simd_id.cpp | 33 + 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 kernels/compiler_get_simd_id.cl

[Beignet] [PATCH 1/2] add simd level function __gen_ocl_get_simd_id

2015-04-15 Thread Guo Yejun
uint __gen_ocl_get_simd_id(); return value ranges from 0 to simdsize - 1 Signed-off-by: Guo Yejun --- backend/src/backend/gen_context.cpp| 9 - backend/src/backend/gen_insn_selection.cpp | 8 backend/src/backend/program.h | 1 + backend/src/ir

[Beignet] [PATCH V4 1/2] add simd level function __gen_ocl_get_simd_size

2015-04-15 Thread Guo Yejun
uint __gen_ocl_get_simd_size(); returns 8 if SIMD8, returns 16 if SIMD16 V2: add missing files remove some unnecessary functions V3: correct the dst register setting, it is possible not uniform V4: remove unnecessary function Signed-off-by: Guo Yejun --- backend/src/backend

Re: [Beignet] [PATCH V3 1/2] add simd level function __gen_ocl_get_simd_size

2015-04-15 Thread Guo, Yejun
Yes, thanks, will send out a new version -Original Message- From: Yang, Rong R Sent: Thursday, April 16, 2015 10:34 AM To: Guo, Yejun; beignet@lists.freedesktop.org Cc: Guo, Yejun Subject: RE: [Beignet] [PATCH V3 1/2] add simd level function __gen_ocl_get_simd_size +void ALU0

[Beignet] [PATCH 2/2] add utest for __gen_ocl_get_simd_size

2015-04-15 Thread Guo Yejun
Signed-off-by: Guo Yejun --- kernels/compiler_get_simd_size.cl | 5 + utests/CMakeLists.txt | 3 ++- utests/compiler_get_simd_size.cpp | 32 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 kernels/compiler_get_simd_size.cl

[Beignet] [PATCH V3 1/2] add simd level function __gen_ocl_get_simd_size

2015-04-15 Thread Guo Yejun
uint __gen_ocl_get_simd_size(); returns 8 if SIMD8, returns 16 if SIMD16 V2: add missing files remove unnecessary function V3: correct the dst register setting, it is possible not uniform Signed-off-by: Guo Yejun --- backend/src/backend/gen_insn_selection.cpp | 35

[Beignet] [PATCH 2/2] add utest for __gen_ocl_get_simd_size

2015-04-14 Thread Guo Yejun
Signed-off-by: Guo Yejun --- kernels/compiler_get_simd_size.cl | 5 + utests/CMakeLists.txt | 3 ++- utests/compiler_get_simd_size.cpp | 32 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 kernels/compiler_get_simd_size.cl

[Beignet] [PATCH V2 1/2] add simd level function __gen_ocl_get_simd_size

2015-04-14 Thread Guo Yejun
uint __gen_ocl_get_simd_size(); returns 8 if SIMD8, returns 16 if SIMD16 V2: add missing files remove unnecessary function Signed-off-by: Guo Yejun --- backend/src/backend/gen_insn_selection.cpp | 36 ++ backend/src/ir/context.hpp | 6

Re: [Beignet] [PATCH 1/2] add simd level function __gen_ocl_get_simd_size

2015-04-14 Thread Guo, Yejun
Please ignore this patch set since I missed to add another file. -Original Message- From: Guo, Yejun Sent: Tuesday, April 14, 2015 4:07 PM To: beignet@lists.freedesktop.org Cc: Guo, Yejun Subject: [PATCH 1/2] add simd level function __gen_ocl_get_simd_size uint __gen_ocl_get_simd_size

[Beignet] [PATCH 2/2] add utest for __gen_ocl_get_simd_size

2015-04-14 Thread Guo Yejun
Signed-off-by: Guo Yejun --- kernels/compiler_get_simd_size.cl | 5 + utests/CMakeLists.txt | 3 ++- utests/compiler_get_simd_size.cpp | 32 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 kernels/compiler_get_simd_size.cl

[Beignet] [PATCH 1/2] add simd level function __gen_ocl_get_simd_size

2015-04-14 Thread Guo Yejun
uint __gen_ocl_get_simd_size(); returns 8 if SIMD8, returns 16 if SIMD16 Signed-off-by: Guo Yejun --- backend/src/backend/gen_insn_selection.cpp | 41 ++ backend/src/ir/context.hpp | 6 + backend/src/ir/instruction.cpp | 30

Re: [Beignet] [PATCH] GBE: should initialize useDWLabel to false by default.

2015-04-14 Thread Guo, Yejun
LGTM, thanks. -Original Message- From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Zhigang Gong Sent: Tuesday, April 14, 2015 1:47 PM To: beignet@lists.freedesktop.org Cc: Gong, Zhigang Subject: [Beignet] [PATCH] GBE: should initialize useDWLabel to false by defau

Re: [Beignet] [PATCH 1/2] add 3 simd level built-in functions: shuffle, simdsize and simdid

2015-04-06 Thread Guo, Yejun
after this big patch is accepted in the code. -Original Message- From: Yang, Rong R Sent: Friday, April 03, 2015 1:47 PM To: Guo, Yejun; beignet@lists.freedesktop.org Subject: RE: [PATCH 1/2] add 3 simd level built-in functions: shuffle, simdsize and simdid Some comments. Thank

Re: [Beignet] [PATCH 1/2] add 3 simd level built-in functions: shuffle, simdsize and simdid

2015-03-26 Thread Guo, Yejun
Ask for review, thanks. yejun -Original Message- From: Guo, Yejun Sent: Friday, March 20, 2015 1:58 PM To: beignet@lists.freedesktop.org Cc: Guo, Yejun Subject: [PATCH 1/2] add 3 simd level built-in functions: shuffle, simdsize and simdid uint __gen_ocl_get_simd_size(); returns 8 if

[Beignet] [PATCH 2/2] add utest for __gen_ocl_simd_shuffle and __gen_ocl_get_simd_size/id

2015-03-19 Thread Guo Yejun
Signed-off-by: Guo Yejun --- kernels/compiler_simd_shuffle.cl | 15 ++ utests/CMakeLists.txt| 1 + utests/compiler_simd_shuffle.cpp | 44 3 files changed, 60 insertions(+) create mode 100644 kernels/compiler_simd_shuffle.cl

[Beignet] [PATCH 1/2] add 3 simd level built-in functions: shuffle, simdsize and simdid

2015-03-19 Thread Guo Yejun
value of x of the c-th channel of the SIMD is returned, for all SIMD channels, the behavior is undefined if c is larger than simdsize - 1 Signed-off-by: Guo Yejun --- backend/src/backend/gen8_context.cpp | 29 - backend/src/backend/gen_context.cpp| 127

[Beignet] [PATCH] correct env var to output llvm IR

2015-03-16 Thread Guo Yejun
Signed-off-by: Guo Yejun --- docs/Beignet/Backend.mdwn | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/Beignet/Backend.mdwn b/docs/Beignet/Backend.mdwn index e4259fb..cf80318 100644 --- a/docs/Beignet/Backend.mdwn +++ b/docs/Beignet/Backend.mdwn @@ -48,10 +48,12

Re: [Beignet] [patch v2] strip PointerCast for call instructions before use.

2015-03-16 Thread Guo, Yejun
LGTM, thanks. -Original Message- From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of xionghu@intel.com Sent: Tuesday, March 17, 2015 1:26 PM To: beignet@lists.freedesktop.org Cc: Luo, Xionghu Subject: [Beignet] [patch v2] strip PointerCast for call instructions b

Re: [Beignet] [PATCH] runtime: don't free the host_ptr for a subbuffer.

2015-02-06 Thread Guo, Yejun
Nice catch, LGTM, thanks. -Original Message- From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Zhigang Gong Sent: Friday, February 06, 2015 5:53 PM To: beignet@lists.freedesktop.org Cc: Gong, Zhigang Subject: [Beignet] [PATCH] runtime: don't free the host_ptr for a

Re: [Beignet] version 4 of libva buffer sharing patchset

2015-02-01 Thread Guo, Yejun
The patch LGTM, thanks. From: Weng, Chuanbo Sent: Monday, February 02, 2015 3:06 PM To: Guo, Yejun; beignet@lists.freedesktop.org Subject: RE: version 4 of libva buffer sharing patchset Removed and updated the patchset. From: Guo, Yejun Sent: Monday, February 02, 2015 14:11 To: Weng, Chuanbo

Re: [Beignet] version 4 of libva buffer sharing patchset

2015-02-01 Thread Guo, Yejun
Looks fine except one comment: OUTPUT_NV12_DEFAULT is not really used, we can just remove it. From: Weng, Chuanbo Sent: Thursday, January 29, 2015 11:33 AM To: Guo, Yejun; beignet@lists.freedesktop.org Subject: RE: version 4 of libva buffer sharing patchset Hi Yejun, Thanks for

Re: [Beignet] runtime_alloc_host_ptr_buffer intermittent failure

2015-01-31 Thread Guo, Yejun
Thanks Palmer for the investigation. 1. yes, the logic is not good to free an incompletely-set-up buffer, need to fix it. 2. I currently have not reproduced the issue, and have no idea on the EINVAL (errno=22). Does the system run out of memory at that time? Could you please help to add opti

Re: [Beignet] version 4 of libva buffer sharing patchset

2015-01-25 Thread Guo, Yejun
how about the test if the condition is not satisfied, maybe we need assert here. From: Weng, Chuanbo Sent: Friday, January 23, 2015 6:23 PM To: beignet@lists.freedesktop.org; Guo, Yejun Subject: version 4 of libva buffer sharing patchset Hi all, Please fetch the 4th version of patchset f

[Beignet] [PATCH 2/2] update utest to loose userptr limitation

2015-01-21 Thread Guo Yejun
the limitation is loosed from page size to cache line size alignment inside driver, update utest accordingly. Signed-off-by: Guo Yejun --- benchmark/benchmark_use_host_ptr_buffer.cpp | 2 +- utests/runtime_use_host_ptr_buffer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions

[Beignet] [PATCH 1/2] loose the alignment limitation for host_ptr of CL_MEM_USE_HOST_PTR

2015-01-21 Thread Guo Yejun
the current limitation is both host_ptr and buffer size should be page aligned, loose the limitation of host_ptr to be cache line size (64byte) alignment, and no limitation for the size. Signed-off-by: Guo Yejun --- src/cl_command_queue.c | 8 ++-- src/cl_mem.c | 17

[Beignet] [PATCH] correct the cache line size to be 64

2015-01-21 Thread Guo Yejun
the correct value of cache line size is 64 bytes, not 128. Signed-off-by: Guo Yejun --- src/cl_gen75_device.h | 2 +- src/cl_gen7_device.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cl_gen75_device.h b/src/cl_gen75_device.h index 8cf2dcd..43f6e8f 100644 --- a

[Beignet] [PATCH V3] add CMake option USE_STANDALONE_GBE_COMPILER and STANDALONE_GBE_COMPILER_DIR

2015-01-09 Thread Guo Yejun
, and build driver with it. v3: add file FindStandaloneGbeCompiler.cmake to make the main cmakefile clean. Signed-off-by: Guo Yejun --- CMake/FindStandaloneGbeCompiler.cmake | 35 +++ CMakeLists.txt| 15 +++ GetGenID.sh

[Beignet] [PATCH 4/4] add howto for old gcc version

2015-01-08 Thread Guo Yejun
Signed-off-by: Guo Yejun --- docs/howto/oldgcc-howto.mdwn | 58 1 file changed, 58 insertions(+) create mode 100644 docs/howto/oldgcc-howto.mdwn diff --git a/docs/howto/oldgcc-howto.mdwn b/docs/howto/oldgcc-howto.mdwn new file mode 100644 index

[Beignet] [PATCH 3/4] only build tests that do not need compiler when standalone compiler is provided

2015-01-08 Thread Guo Yejun
the running system. btw, please make sure compiler_ceil.bin is really updated if there is already one there, the safe way is to delete it first. Signed-off-by: Guo Yejun --- CMakeLists.txt| 4 utests/CMakeLists.txt | 27 +++ 2 files changed, 23 insertions

[Beignet] [PATCH V2 2/4] add CMake option USE_STANDALONE_GBE_COMPILER and STANDALONE_GBE_COMPILER_DIR

2015-01-08 Thread Guo Yejun
, and build driver with it. Signed-off-by: Guo Yejun --- CMakeLists.txt | 43 +++ GetGenID.sh| 26 ++ backend/CMakeLists.txt | 20 +--- backend/src/CMakeLists.txt | 20

[Beignet] [PATCH V2 1/4] add option BUILD_STANDALONE_GBE_COMPILER to build static compiler

2015-01-08 Thread Guo Yejun
: change the option name to BUILD_STANDALONE_GBE_COMPILER. zip necessary files into a tar ball. Signed-off-by: Guo Yejun --- backend/src/CMakeLists.txt | 39 +-- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/backend/src/CMakeLists.txt b

[Beignet] [PATCH] remove useless dependency libocl

2015-01-07 Thread Guo Yejun
libocl is the name of sub directory, the project name in the sub directory, it is not something that others can depend on. Signed-off-by: Guo Yejun --- backend/src/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/backend/src/CMakeLists.txt b/backend/src/CMakeLists.txt index

Re: [Beignet] [PATCH 3/3] add CMAKE option ENABLE_RTTI for some stl version

2015-01-06 Thread Guo, Yejun
Ok, it is also a practical method. -Original Message- From: Zhigang Gong [mailto:zhigang.g...@linux.intel.com] Sent: Wednesday, January 07, 2015 12:56 PM To: Guo, Yejun Cc: beignet@lists.freedesktop.org Subject: Re: [Beignet] [PATCH 3/3] add CMAKE option ENABLE_RTTI for some stl

Re: [Beignet] [PATCH 3/3] add CMAKE option ENABLE_RTTI for some stl version

2015-01-06 Thread Guo, Yejun
r 1 -Original Message- From: Zhigang Gong [mailto:zhigang.g...@linux.intel.com] Sent: Wednesday, January 07, 2015 12:13 PM To: Guo, Yejun Cc: beignet@lists.freedesktop.org Subject: Re: [Beignet] [PATCH 3/3] add CMAKE option ENABLE_RTTI for some stl version Can we just remove -fno-rtti? D

[Beignet] [PATCH] refine gbe_bin_generater usage to add -t option

2015-01-06 Thread Guo Yejun
-t option specifies the gen target pci id, it tells gbe_bin_generater the target platform that it compiles for. The compile result is llvm level binary if this option is not given. Signed-off-by: Guo Yejun --- backend/src/gbe_bin_generater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [Beignet] [PATCH 3/3] add CMAKE option ENABLE_RTTI for some stl version

2015-01-06 Thread Guo, Yejun
07, 2015 10:26 AM To: Guo, Yejun Cc: beignet@lists.freedesktop.org Subject: Re: [Beignet] [PATCH 3/3] add CMAKE option ENABLE_RTTI for some stl version Could you find out the specified STL version? And do some checking at configuration time and remove or add fno-rtti according to the checking

Re: [Beignet] [PATCH 2/3] support CL_EMBEDDED_PROFILE with offline compiler

2015-01-06 Thread Guo, Yejun
Yes, I expected to compile with -t option. Will also refine the gbe_bin_generator usage information. -Original Message- From: Zhigang Gong [mailto:zhigang.g...@linux.intel.com] Sent: Wednesday, January 07, 2015 10:40 AM To: Guo, Yejun Cc: beignet@lists.freedesktop.org Subject: Re

Re: [Beignet] [PATCH 2/3] support CL_EMBEDDED_PROFILE with offline compiler

2015-01-06 Thread Guo, Yejun
ssage- From: Zhigang Gong [mailto:zhigang.g...@linux.intel.com] Sent: Wednesday, January 07, 2015 11:11 AM To: Guo, Yejun Cc: beignet@lists.freedesktop.org Subject: RE: [Beignet] [PATCH 2/3] support CL_EMBEDDED_PROFILE with offline compiler > -Original Message- > From: Beignet

Re: [Beignet] [PATCH 2/3] support CL_EMBEDDED_PROFILE with offline compiler

2015-01-06 Thread Guo, Yejun
sable, and the document, do not object your comments, and will modify accordingly. -Original Message- From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Zhigang Gong Sent: Wednesday, January 07, 2015 8:31 AM To: Guo, Yejun Cc: beignet@lists.freedesktop.org Subjec

Re: [Beignet] [PATCH 1/3] add option BUILD_STATIC_GBE_COMPILER to build static compiler

2014-12-31 Thread Guo, Yejun
I’m afraid it is not in the plan, the expected method is to link with the dynamic library libcl.so. From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of spring_wind Sent: Wednesday, December 31, 2014 7:52 PM To: Guo, Yejun Cc: beignet@lists.freedesktop.org Subject: Re

Re: [Beignet] [PATCH 1/3] add option BUILD_STATIC_GBE_COMPILER to build static compiler

2014-12-31 Thread Guo, Yejun
: spring_wind [mailto:spring_w...@yeah.net] Sent: Wednesday, December 31, 2014 4:30 PM To: Guo, Yejun Cc: beignet@lists.freedesktop.org Subject: Re:[Beignet] [PATCH 1/3] add option BUILD_STATIC_GBE_COMPILER to build static compiler Do you have plan to support to build libcl and libgbe_interp in static

[Beignet] [PATCH 3/3] add CMAKE option ENABLE_RTTI for some stl version

2014-12-30 Thread Guo Yejun
for some STL version, unable to build with -fno-rtti, have to enable it. Signed-off-by: Guo Yejun --- CMakeLists.txt | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5cb31c2..9b9c9ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt

[Beignet] [PATCH 2/3] support CL_EMBEDDED_PROFILE with offline compiler

2014-12-30 Thread Guo Yejun
/your_path_to_compiler looks like: beignet.bc beignet.pch gbe_bin_generater include 3. Within old environment, build with STATIC_GBE_COMPILER_PATH=/your_path_to_compiler libcl.so and libgbeinterp.so will be built here, libgbe.so and gbe_bin_generater will not be built here. Signed-off-by: Guo Yejun

[Beignet] [PATCH 1/3] add option BUILD_STATIC_GBE_COMPILER to build static compiler

2014-12-30 Thread Guo Yejun
The offline compiler (gbe_bin_generater), depending on LLVM/clang, could only be built with C++11 features. To make it workable within old c/c++ version environment, add one CMAKE option to link against all static libraries. Signed-off-by: Guo Yejun --- backend/src/CMakeLists.txt | 33

[Beignet] [PATCH] fix utest build for some old gcc version

2014-12-30 Thread Guo Yejun
change the keyword from constexpr to const, update the code for explicit type conversion and std::map's iterator. Signed-off-by: Guo Yejun --- utests/compiler_displacement_map_element.cpp | 4 +-- utests/compiler_saturate.cpp | 2 +- utests/compiler_saturate_su

[Beignet] [PATCH 3/3] do not use C++11 features inside libgbeinterp

2014-12-28 Thread Guo Yejun
OpenCL compiler) which depends on LLVM/clang Signed-off-by: Guo Yejun --- backend/src/backend/program.cpp | 17 --- backend/src/backend/program.hpp | 6 +-- backend/src/ir/constant.cpp | 3 +- backend/src/ir/constant.hpp | 5 ++- backend/src/ir/function.hpp | 22

<    1   2   3   4   5   >