[Beignet] [PATCH] add building dependency GIT_SHA1

2014-11-04 Thread Meng Mengmeng
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.txt +++ b/src/CMakeLists.txt @@ -119,6 +119,7 @@ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_

Re: [Beignet] [Patch for Release_v0.9.x 4/6] GBE: fix bug in pow/pown.

2014-11-04 Thread Zhigang Gong
The subject is incorrect, should be fix bug in tgamma. On Wed, Nov 05, 2014 at 01:14:43PM +0800, Zhigang Gong wrote: > tgamma is actually lgamma, a related but very different function. > > This patch is from: > https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=Fix-pow-erf-tgamma.patch;

Re: [Beignet] [Patch for Release_v0.9.x 3/6] GBE: fix bug in pow/pown.

2014-11-04 Thread Zhigang Gong
The subject is incorrect, please ignore it, I already fixed it locally. It should be fix bug in erf/erfc. On Wed, Nov 05, 2014 at 01:14:42PM +0800, Zhigang Gong wrote: > erf/erfc diverge (instead of converging to 1 or 0) for arguments above > about 2. > > This patch is from: > https://bugs.debian

[Beignet] [PATCH 3/6] GBE: fix bug in erf/erfc.

2014-11-04 Thread Zhigang Gong
erf/erfc diverge (instead of converging to 1 or 0) for arguments above about 2. This patch is from: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=Fix-pow-erf-tgamma.patch;att=3;bug=768090 Signed-off-by: Zhigang Gong --- backend/src/libocl/tmpl/ocl_math.tmpl.cl | 288 +

[Beignet] [PATCH 6/6] utests: fix bugs in builtin_tgamma().

2014-11-04 Thread Zhigang Gong
This patch is based on Rebecca's patch at: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=Fix-pow-erf-tgamma.patch;att=3;bug=768090. And fixed another bug which we should not use an absolute error checking. We should use ULP and considering the strict conformance or non strict conf

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

2014-11-04 Thread Zhigang Gong
Add support for the following OPs: FCmp/ICmp/FPToSI/FPToUI/SIToFP/UIToFP. Signed-off-by: Zhigang Gong --- backend/src/ir/immediate.cpp | 45 + backend/src/ir/immediate.hpp | 40 - backend/src/llvm/llvm_gen_backend.cpp

[Beignet] [PATCH 2/6] GBE: fix bug in pow/pown.

2014-11-04 Thread Zhigang Gong
pow/pown ignore the sign of their first argument (e.g. pow(-2,3) gives 8 instead of -8) This patch is from: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=Fix-pow-erf-tgamma.patch;att=3;bug=768090 Signed-off-by: Zhigang Gong --- backend/src/libocl/script/ocl_math.def | 3 +-- b

[Beignet] [PATCH 5/6] utests: fix bugs in builtin_pow(0.

2014-11-04 Thread Zhigang Gong
This patch is based on Rebecca's patch at: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=Fix-pow-erf-tgamma.patch;att=3;bug=768090. And fixed another bug which we should not use an absolute error checking. We should use ULP and considering the strict conformance or non strict conf

[Beignet] [PATCH 4/6] GBE: fix bug in lgamma.

2014-11-04 Thread Zhigang Gong
tgamma is actually lgamma, a related but very different function. This patch is from: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=Fix-pow-erf-tgamma.patch;att=3;bug=768090 Signed-off-by: Zhigang Gong --- backend/src/libocl/tmpl/ocl_math.tmpl.cl | 190 ++-

[Beignet] [Patch for Release_v0.9.x 2/6] GBE: fix bug in pow/pown.

2014-11-04 Thread Zhigang Gong
pow/pown ignore the sign of their first argument (e.g. pow(-2,3) gives 8 instead of -8) This patch is from: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=Fix-pow-erf-tgamma.patch;att=3;bug=768090 Signed-off-by: Zhigang Gong --- backend/src/builtin_vector_proto.def | 3 +-- backe

[Beignet] [Patch for Release_v0.9.x 6/6] utests: fix bugs in builtin_tgamma().

2014-11-04 Thread Zhigang Gong
This patch is based on Rebecca's patch at: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=Fix-pow-erf-tgamma.patch;att=3;bug=768090. And fixed another bug which we should not use an absolute error checking. We should use ULP and considering the strict conformance or non strict conf

[Beignet] [Patch for Release_v0.9.x 1/6] GBE: Support more instructions for constant expression handling.

2014-11-04 Thread Zhigang Gong
Add support for the following OPs: FCmp/ICmp/FPToSI/FPToUI/SIToFP/UIToFP. Signed-off-by: Zhigang Gong --- backend/src/ir/immediate.cpp | 45 ++ backend/src/ir/immediate.hpp | 52 ++- backend/src/llvm/llvm_gen_backend.c

[Beignet] [Patch for Release_v0.9.x 5/6] utests: fix bugs in builtin_pow(0.

2014-11-04 Thread Zhigang Gong
This patch is based on Rebecca's patch at: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=Fix-pow-erf-tgamma.patch;att=3;bug=768090. And fixed another bug which we should not use an absolute error checking. We should use ULP and considering the strict conformance or non strict conf

[Beignet] [Patch for Release_v0.9.x 3/6] GBE: fix bug in pow/pown.

2014-11-04 Thread Zhigang Gong
erf/erfc diverge (instead of converging to 1 or 0) for arguments above about 2. This patch is from: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=Fix-pow-erf-tgamma.patch;att=3;bug=768090 Signed-off-by: Zhigang Gong --- backend/src/ocl_stdlib.tmpl.h | 288

[Beignet] [Patch for Release_v0.9.x 4/6] GBE: fix bug in pow/pown.

2014-11-04 Thread Zhigang Gong
tgamma is actually lgamma, a related but very different function. This patch is from: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=Fix-pow-erf-tgamma.patch;att=3;bug=768090 Signed-off-by: Zhigang Gong --- backend/src/ocl_stdlib.tmpl.h | 189 ++

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

2014-11-04 Thread Zhigang Gong
On Tue, Nov 04, 2014 at 10:42:48PM +, Rebecca N. Palmer wrote: > In current beignet (commit 4caba11ce88b3c1ec80ee119ceaf4bf778b96471): > -pow/pown ignore the sign of their first argument (e.g. pow(-2,3) gives > 8 instead of -8) > -erf/erfc diverge (instead of converging to 1 or 0) for arguments

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

2014-11-04 Thread Zhigang Gong
The patch LGTM. Could you reply with a signed-off signature? And it triggers some other bugs related to constant expression handling when run all unit test cases. I will send out a patchset to fix that issue. On Tue, Nov 04, 2014 at 10:42:48PM +, Rebecca N. Palmer wrote: > In current beignet

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

2014-11-04 Thread Rebecca N. Palmer
In current beignet (commit 4caba11ce88b3c1ec80ee119ceaf4bf778b96471): -pow/pown ignore the sign of their first argument (e.g. pow(-2,3) gives 8 instead of -8) -erf/erfc diverge (instead of converging to 1 or 0) for arguments above about 2 -tgamma is actually lgamma, a related but very different fu

Re: [Beignet] [PATCH 1/2] enable llvm intrinsic call bswap function.

2014-11-04 Thread Zhigang Gong
It's better to put a FIXME tag in the code to indicate there should be better implementation than this unoptimized version. The optimized version could leverage Gen's register region/indirect addressing to optimize the byte swap operations. Let's defer this type of optimization to next release. Th

Re: [Beignet] [PATCH 3/4] GBE: fix disassembly bug.

2014-11-04 Thread Zhigang Gong
Right, I already fixed it locally, just forgot to commit. Will push my local version. Thanks for the review comments. On Tue, Nov 04, 2014 at 09:00:04AM +, Yang, Rong R wrote: > This patch will cause some unused-variable warning. > > > -Original Message- > > From: Beignet [mailto:beig

Re: [Beignet] [PATCH 1/2] utest: change the box_blur_image to be identical to box_blur.

2014-11-04 Thread Yang, Rong R
LGTM, thanks. > -Original Message- > From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of > Zhigang Gong > Sent: Friday, October 31, 2014 10:05 > To: beignet@lists.freedesktop.org > Cc: rebecca_pal...@zoho.com; Gong, Zhigang > Subject: [Beignet] [PATCH 1/2] utest: chan

Re: [Beignet] [PATCH 3/4] GBE: fix disassembly bug.

2014-11-04 Thread Yang, Rong R
This patch will cause some unused-variable warning. > -Original Message- > From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of > Zhigang Gong > Sent: Monday, November 3, 2014 16:25 > To: beignet@lists.freedesktop.org > Cc: Gong, Zhigang > Subject: [Beignet] [PATCH 3/4

Re: [Beignet] [PATCH] GBE: Fix live range for temporary register in replaceReg

2014-11-04 Thread Zhigang Gong
Good catch, ruiling. Just pushed, thanks. On Tue, Nov 04, 2014 at 03:22:40PM +0800, Ruiling Song wrote: > previously it is simply assigned as [insnID, insnID], But it is used in 2 > instruction: > [1] MOV tmp, replacedReg > [2] send null, addr, tmp,... > > As minID maxID is equal, it will be tre