[Beignet] [PATCH 6/9] runtime: fix clLinkProgram bug.

2015-11-12 Thread xionghu . luo
From: Luo Xionghu clLinkProgram need check the existence of "-cl-kernel-arg-info" build_option of all the input_programs. User may link two SPIR program and call clGetKernelArgInfo to query kernel args. Signed-off-by: Luo Xionghu ---

[Beignet] [PATCH 8/9] gbe: add vec_type_hint's type into functionAttributes.

2015-11-12 Thread xionghu . luo
From: Luo Xionghu for SPIR kernel, user may call clGetKernelInfo with CL_KERNEL_ATTRIBUTES to query the functionAttributes. Signed-off-by: Luo Xionghu --- backend/src/ir/type.cpp | 6 ++-- backend/src/llvm/llvm_gen_backend.cpp | 65

[Beignet] [PATCH 7/9] runtime: add missing supported format image_1d_buffer.

2015-11-12 Thread xionghu . luo
From: Luo Xionghu Signed-off-by: Luo Xionghu --- src/cl_api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cl_api.c b/src/cl_api.c index e5ee002..a56b596 100644 --- a/src/cl_api.c +++ b/src/cl_api.c @@ -682,6 +682,7 @@

[Beignet] [PATCH 3/9] gbe/libocl: change xxx_fence function to OVERLOADABLE.

2015-11-12 Thread xionghu . luo
From: Luo Xionghu the mem_fence, read_mem_fence and write_mem_fence functions need be OVERLOADABLE for link. Signed-off-by: Luo Xionghu --- backend/src/libocl/include/ocl_sync.h | 6 +++--- backend/src/libocl/src/ocl_sync.cl| 6 +++--- 2 files

[Beignet] [PATCH 9/9] gbe/libocl: define the gentype half_xxx math function instead of using MACRO.

2015-11-12 Thread xionghu . luo
From: Luo Xionghu these function need to be overloadable for link. Signed-off-by: Luo Xionghu --- backend/src/libocl/script/ocl_math.def | 28 ++--- backend/src/libocl/tmpl/ocl_math.tmpl.cl | 42

[Beignet] [PATCH 1/9] gbe/libocl: define the vloada_xxx function instead of using MACRO.

2015-11-12 Thread xionghu . luo
From: Luo Xionghu these function need to be overloadable for link. Signed-off-by: Luo Xionghu --- backend/src/libocl/include/ocl_vload.h | 13 ++--- backend/src/libocl/src/ocl_vload.cl| 21 - 2 files changed, 26

[Beignet] [PATCH 5/9] runtime: fix clCompileProgram bug.

2015-11-12 Thread xionghu . luo
From: Luo Xionghu forgot to add FROM_LLVM_SPIR in compileProgram; the BINARY_TYPE is BINARY_TYPE_INTERMIDIATE if create from SPIR binary. Signed-off-by: Luo Xionghu --- src/cl_api.c | 1 + src/cl_program.c | 5 - src/cl_program.h | 1 + 3

[Beignet] [PATCH 4/9] runtime: initialize the memory content to 0.

2015-11-12 Thread xionghu . luo
From: Luo Xionghu Signed-off-by: Luo Xionghu --- src/cl_api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cl_api.c b/src/cl_api.c index ddd39cf..9eb4ffd 100644 --- a/src/cl_api.c +++ b/src/cl_api.c @@ -56,6 +56,7 @@ typedef intptr_t

[Beignet] [PATCH 2/9] gbe: use kernel_arg_base_type to recognize image arguments.

2015-11-12 Thread xionghu . luo
From: Luo Xionghu we use string compare function to recognize the image type, but image types could be defined to other type, so use kernel_arg_base_type to recognize image arguments. --- backend/src/ir/function.hpp | 15 ---

[Beignet] [PATCH 2/5] GBE: don't assert even if we fail to compile kernel at the backend stage.

2015-11-12 Thread Zhigang Gong
We should not assert even if the application triggers a internal limitation such as lack of scratch space. We should return error to the application and let the application to make further decision. Signed-off-by: Zhigang Gong --- backend/src/backend/context.cpp

[Beignet] [PATCH 4/5] runtime: set CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE to kernel's SIMD_WIDTH.

2015-11-12 Thread Zhigang Gong
It makes sense to set CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE to the corresponding SIMD size. Then it provides a way for intel's OCL application to get SIMD width at runtime and make some SIMD width dependant optimization possible. Signed-off-by: Zhigang Gong ---

[Beignet] [PATCH 3/5] GBE: remove useless assertions code.

2015-11-12 Thread Zhigang Gong
Signed-off-by: Zhigang Gong --- backend/src/backend/context.cpp | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/backend/src/backend/context.cpp b/backend/src/backend/context.cpp index 47d8a45..5f5a858 100644 ---

[Beignet] [PATCH 1/5] GBE: extent register allocator size/offset to 32bit.

2015-11-12 Thread Zhigang Gong
Because the range of scratch size exceed the int16_t's maximum size. We have to extent these elements to 32 bit. Signed-off-by: Zhigang Gong --- backend/src/backend/context.cpp | 52 - backend/src/backend/context.hpp | 6 ++--- 2

[Beignet] [PATCH 5/5] GBE: decrease the loop unrolling threshold to 640.

2015-11-12 Thread Zhigang Gong
1024 is some how too large for some kernels and may cause some kernels fail to build due to lack of enough scratching space. Signed-off-by: Zhigang Gong --- backend/src/llvm/llvm_to_gen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Beignet] [PATCH] runtime: silent some error messages.

2015-11-12 Thread Zhigang Gong
We already set corresponding error code and return it to the caller. Don't bother to print the error messages in beignet internal. Signed-off-by: Zhigang Gong --- src/cl_command_queue_gen7.c | 3 --- 1 file changed, 3 deletions(-) diff --git