Re: [Beignet] [PATCH] GBE: handle dead loop BBs in liveness analysis.

2014-10-23 Thread yan . wang
I tried your patch and the bug is fixed. Thanks. Yan Wang > LGTM, thanks. > >> -Original Message- >> From: Gong, Zhigang >> Sent: Friday, October 24, 2014 11:41 >> To: beignet@lists.freedesktop.org >> Cc: yan.w...@linux.intel.com; Yang, Rong R; Gong, Zhigang >> Subject: [PATCH] GBE: handl

Re: [Beignet] [PATCH] GBE: handle dead loop BBs in liveness analysis.

2014-10-23 Thread Yang, Rong R
LGTM, thanks. > -Original Message- > From: Gong, Zhigang > Sent: Friday, October 24, 2014 11:41 > To: beignet@lists.freedesktop.org > Cc: yan.w...@linux.intel.com; Yang, Rong R; Gong, Zhigang > Subject: [PATCH] GBE: handle dead loop BBs in liveness analysis. > > Considering the following

[Beignet] [PATCH] GBE: handle dead loop BBs in liveness analysis.

2014-10-23 Thread Zhigang Gong
Considering the following CFG, our previous liveness analysis will only back traverse from the exit point BB, thus the BB 6 and 7 will not be handled. 4--- | | | | 5 --|---> 10 ---> ret | | | | 6<-- | |<-- 7 | | | --- Although the CFG l

Re: [Beignet] Beignet crashes on vanilla 3.17.1 with IVB hardware

2014-10-23 Thread Zhigang Gong
Hi, For IVB, I just checked the 3.18-rc1, it has the following patch: commit c9224faa59c3071ecfa2d4b24592f4eb61e57069 Author: Brad Volkin Date: Tue Jun 17 14:10:34 2014 -0700 drm/i915: Add some L3 registers to the parser whitelist Beignet needs these in order to program the L3 cache c

[Beignet] [PATCH] create GIT_SHA1 without any dependency

2014-10-23 Thread Meng Mengmeng
--- src/CMakeLists.txt | 5 ++--- src/git_sha1.sh| 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0d22589..9e65856 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -110,11 +110,10 @@ SET(CMAKE_C_FLAGS "-DHAS_OCLIc

Re: [Beignet] possilbe bug when run opencv_test_imgproc

2014-10-23 Thread He Junyan
`gpgpu->binded_buf[i]->offset != 0' failed. Segmentation fault (core dumped) Sometimes this kind of assert may have relationship with multi-thread bug. On 四, 2014-10-23 at 06:12 -0700, yan.w...@linux.intel.com wrote: > Update: > Under root account, it will crash. > Under user account(e.g. yanwa

Re: [Beignet] possilbe bug when run opencv_test_imgproc

2014-10-23 Thread Zhigang Gong
Ok. So this is likely a BYT T platform only issue, it may trigger a GPU hang at OCL_ImageProc/Filter2D.Mat/256. You can use dmesg to check whether there was a hang. On Thu, Oct 23, 2014 at 06:04:47AM -0700, yan.w...@linux.intel.com wrote: > In my baytail T platform, it is still exist. > > > Befo

Re: [Beignet] possilbe bug when run opencv_test_imgproc

2014-10-23 Thread yan . wang
Update: Under root account, it will crash. Under user account(e.g. yanwang), it will pass. > In my baytail T platform, it is still exist. > >> Before leaving office, I have built the latest beignet. I will try it >> again tomorrow. >> Thanks. >> >> Yan Wang >> >>> Can't reproduce it here. Did you

Re: [Beignet] possilbe bug when run opencv_test_imgproc

2014-10-23 Thread yan . wang
In my baytail T platform, it is still exist. > Before leaving office, I have built the latest beignet. I will try it > again tomorrow. > Thanks. > > Yan Wang > >> Can't reproduce it here. Did you use the latest git master? >> >> The latest git version is >> commit 33a043e903f9d61445d3fb7972becf83c

Re: [Beignet] possilbe bug when run opencv_test_imgproc

2014-10-23 Thread yan . wang
Before leaving office, I have built the latest beignet. I will try it again tomorrow. Thanks. Yan Wang > Can't reproduce it here. Did you use the latest git master? > > The latest git version is > commit 33a043e903f9d61445d3fb7972becf83c2842276 > Author: Junyan He > Date: Thu Oct 23 13:09:00 2

[Beignet] Beignet crashes on vanilla 3.17.1 with IVB hardware

2014-10-23 Thread Vasily Khoruzhick
Hi, As you maybe know, any application which uses beignet OpenCL implementation crashes on Ivy Bridge hardware when using vanilla 3.17.1 kernel. I guess it's due to batchbuffer security and patch to disable batchbuffer security is required, but guys, it fails since 3.16, and 3.17 was released quit

Re: [Beignet] possilbe bug when run opencv_test_imgproc

2014-10-23 Thread Zhigang Gong
And please also give the platform id in the report, such as device_name "Intel(R) HD Graphics IvyBridge GT2" device_opencl_c_version "OpenCL C 1.2 beignet 0.9 (git-33a043e)" The above info should be helpful. Thanks, Zhigang Gong. On Thu, Oct 23, 2014 at 05:52:43PM +0800, Zhigang Gong wrote: > Can

Re: [Beignet] possilbe bug when run opencv_test_imgproc

2014-10-23 Thread Zhigang Gong
Can't reproduce it here. Did you use the latest git master? The latest git version is commit 33a043e903f9d61445d3fb7972becf83c2842276 Author: Junyan He Date: Thu Oct 23 13:09:00 2014 +0800 Add the disasm support for Gen8 Signed-off-by: Junyan He Reviewed-by: Zhigang Gong Re

[Beignet] possilbe bug when run opencv_test_imgproc

2014-10-23 Thread yan . wang
Hi, All, I found one possible bug for review. if run the following: ./opencv_test_imgproc --gtest_filter=OCL_ImageProc/Filter2D.Mat*. OCL_ImageProc/Filter2D.Mat/256 failed and continue. But the whole test flow will crash in OCL_ImageProc/Filter2D.Mat/257: [ FAILED ] OCL_ImageProc/Filter2

Re: [Beignet] opencv_test_imgproc crashs when test OCL_Imgproc/HoughLines.RealImage/0

2014-10-23 Thread Zhigang Gong
Thanks. On Thu, Oct 23, 2014 at 02:59:14AM -0700, yan.w...@linux.intel.com wrote: > Done. > > > Sure. I will try again and file it. > > > >> I just tried on my IVB machine, and it could be reproduced easily, just > >> need > >> to unset the environment variable. > >> And this is a platform indepe

Re: [Beignet] opencv_test_imgproc crashs when test OCL_Imgproc/HoughLines.RealImage/0

2014-10-23 Thread yan . wang
Done. > Sure. I will try again and file it. > >> I just tried on my IVB machine, and it could be reproduced easily, just >> need >> to unset the environment variable. >> And this is a platform independent issue. The backend is just a >> compiler. >> The compiler could complain warnings or >> error

Re: [Beignet] opencv_test_imgproc crashs when test OCL_Imgproc/HoughLines.RealImage/0

2014-10-23 Thread yan . wang
Sure. I will try again and file it. > I just tried on my IVB machine, and it could be reproduced easily, just > need > to unset the environment variable. > And this is a platform independent issue. The backend is just a compiler. > The compiler could complain warnings or > errors but should never

Re: [Beignet] opencv_test_imgproc crashs when test OCL_Imgproc/HoughLines.RealImage/0

2014-10-23 Thread Zhigang Gong
I just tried on my IVB machine, and it could be reproduced easily, just need to unset the environment variable. And this is a platform independent issue. The backend is just a compiler. The compiler could complain warnings or errors but should never crash. If you met a crash in gcc or clang interna

Re: [Beignet] opencv_test_imgproc crashs when test OCL_Imgproc/HoughLines.RealImage/0

2014-10-23 Thread yan . wang
I am not sure whether it is platform issue. So far I have only Baytail T platform no others. The assertion will not be hit now. Still need me submit bug? I could do it. It may be the bug of OpenCL implementation of opecv hough lines for fail case. Need more investigation. > Yan, > > No matter you

Re: [Beignet] OpenCV Morph OCL Perf case is crash based on beignet

2014-10-23 Thread yan . wang
I confirmed it is fixed. Thanks. > Yan, > > How about this one? > > On Thu, Oct 23, 2014 at 12:29:34AM -0700, yan.w...@linux.intel.com wrote: >> Sorry, I should update beignet not opencv. >> I will try. >> >> Yan Wang >> >> > You commit seems not to be merged yet. >> > If merged, I will try. >> >

Re: [Beignet] OpenCV Morph OCL Perf case is crash based on beignet

2014-10-23 Thread Zhigang Gong
Yan, How about this one? On Thu, Oct 23, 2014 at 12:29:34AM -0700, yan.w...@linux.intel.com wrote: > Sorry, I should update beignet not opencv. > I will try. > > Yan Wang > > > You commit seems not to be merged yet. > > If merged, I will try. > > Thanks. > > > > Yan Wang > > > >> Did you try la

Re: [Beignet] opencv_test_imgproc crashs when test OCL_Imgproc/HoughLines.RealImage/0

2014-10-23 Thread Zhigang Gong
Yan, No matter you set or not set the test data. It should never crash beignet in such an assertion. That's the point. Anyway, we will look into it. On Thu, Oct 23, 2014 at 01:40:28AM -0700, yan.w...@linux.intel.com wrote: > My previous mail may misunderstand you. Sorry. > After I cloned opencv_e

Re: [Beignet] opencv_test_imgproc crashs when test OCL_Imgproc/HoughLines.RealImage/0

2014-10-23 Thread yan . wang
My previous mail may misunderstand you. Sorry. After I cloned opencv_extra git and set path rightly, this assertion will not be hit But 1 case of 8 will failed because dst size should be 1x60 and is 1x61 in fact. I am trying to debug it. The other 7 cases passed. > Yan, > > It's still an valid bu

Re: [Beignet] opencv_test_imgproc crashs when test OCL_Imgproc/HoughLines.RealImage/0

2014-10-23 Thread Zhigang Gong
Yan, It's still an valid bug. Beignet should never hit such an assertion if everything works well. Could you open a bug on fd.o for beignet module? You may need to specify the git-hash of the beignet and the opencv you are using. And you need to specify that don't set the opencv test data environm

Re: [Beignet] opencv_test_imgproc crashs when test OCL_Imgproc/HoughLines.RealImage/0

2014-10-23 Thread yan . wang
After cloned related test data, it will not crashed. Sorry. > Hi, All, > This case will crash as the following: > [ RUN ] OCL_Imgproc/HoughLines.RealImage/0 > ASSERTION FAILED: defIt != bbIt->second->end() && defIt->second != NULL > at file /home/yanwang/beignet/backend/src/ir/value.cpp

Re: [Beignet] [PATCH] GBE: fix regression caused by simple block optimization.

2014-10-23 Thread Gong, Zhigang
Thanks for your comment. Actually, no need to add such a comment, as it is not special case. We haven't add all the other instructions into this list because all of them haven't use CMP/SEL/... in it. Unaligned store is just one of those instructions, and you can check the gen_insn_selection.cpp,

[Beignet] opencv_test_imgproc crashs when test OCL_Imgproc/HoughLines.RealImage/0

2014-10-23 Thread yan . wang
Hi, All, This case will crash as the following: [ RUN ] OCL_Imgproc/HoughLines.RealImage/0 ASSERTION FAILED: defIt != bbIt->second->end() && defIt->second != NULL at file /home/yanwang/beignet/backend/src/ir/value.cpp, function gbe::ir::LiveOutSet::RegDefSet& gbe::ir::LiveOutSet::getDefS

Re: [Beignet] [PATCH] GBE: fix regression caused by simple block optimization.

2014-10-23 Thread Luo, Xionghu
LGTM. Add comments for why unaligned store instruction not excluded before push, please. Thanks. Luo Xionghu Best Regards -Original Message- From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Zhigang Gong Sent: Thursday, October 23, 2014 2:26 PM To: beignet@lists.

Re: [Beignet] [PATCH v2 5/5] Fix AUX buffer for page alignment

2014-10-23 Thread Guo, Yejun
LGTM, thanks. -Original Message- From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Zhenyu Wang Sent: Thursday, October 23, 2014 3:19 PM To: beignet@lists.freedesktop.org Subject: [Beignet] [PATCH v2 5/5] Fix AUX buffer for page alignment Apply ALIGN() for aux buff

Re: [Beignet] [PATCH v2 1/5] Make use of write enable flag for mem bo map

2014-10-23 Thread Guo, Yejun
LGTM, thanks. -Original Message- From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of Zhenyu Wang Sent: Thursday, October 23, 2014 3:19 PM To: beignet@lists.freedesktop.org Subject: [Beignet] [PATCH v2 1/5] Make use of write enable flag for mem bo map Use drm/intel o

Re: [Beignet] OpenCV Morph OCL Perf case is crash based on beignet

2014-10-23 Thread yan . wang
Sorry, I should update beignet not opencv. I will try. Yan Wang > You commit seems not to be merged yet. > If merged, I will try. > Thanks. > > Yan Wang > >> Did you try latest git master? >> It should has been fixed by commit: >> commit 5417a7e2afb3f2043dbb8abbaebca5115b87ab70 >> Author: Zhigang

Re: [Beignet] OpenCV Morph OCL Perf case is crash based on beignet

2014-10-23 Thread yan . wang
You commit seems not to be merged yet. If merged, I will try. Thanks. Yan Wang > Did you try latest git master? > It should has been fixed by commit: > commit 5417a7e2afb3f2043dbb8abbaebca5115b87ab70 > Author: Zhigang Gong > Date: Tue Oct 21 21:03:46 2014 +0800 > > GBE: add basic PHINode s

Re: [Beignet] OpenCV Morph OCL Perf case is crash based on beignet

2014-10-23 Thread Zhigang Gong
Did you try latest git master? It should has been fixed by commit: commit 5417a7e2afb3f2043dbb8abbaebca5115b87ab70 Author: Zhigang Gong Date: Tue Oct 21 21:03:46 2014 +0800 GBE: add basic PHINode support in legalize pass. Lack of the incomplete PHINode support currently. After this

[Beignet] [PATCH 2/5] Clear batch buffer pointer after unmap

2014-10-23 Thread Zhenyu Wang
Fix libdrm warning about unmap the unmapped buffer, as when batch terminate we will try to do unmap again, but batch has already been unmapped. Signed-off-by: Zhenyu Wang --- src/intel/intel_batchbuffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/intel_batch

[Beignet] [PATCH 4/5] Use pread/pwrite for buffer enqueue read/write

2014-10-23 Thread Zhenyu Wang
Instead of mmap, use pread/write interface for bo read/write with optimized operations. Result on one mem bandwidth benchmark for buffer enqueue read/write on HSW. Host to device copy - workgroup_size=512 old code with mmap new code with pread/pwrite WG=512 SZ=

[Beignet] [PATCH] GBE: fix regression caused by simple block optimization.

2014-10-23 Thread Zhigang Gong
Almost all 64bit related instructions and unaligned load instruction should be complex instruction. We need to exclude them from simple block. Signed-off-by: Zhigang Gong --- backend/src/backend/gen_insn_selection.cpp | 28 1 file changed, 28 insertions(+) diff --gi

[Beignet] [PATCH 3/5] Remove intel_gpgpu_check_binded_buf_address()

2014-10-23 Thread Zhenyu Wang
On recent kernel with full PPGTT support, we can possibly bind buffer offset with 0, but intel_gpgpu_check_binded_buf_address() always thinks it's invalid, which is not true. So simply remove the check. Signed-off-by: Zhenyu Wang --- src/intel/intel_gpgpu.c | 9 - 1 file changed, 9 delet

[Beignet] [PATCH v2 5/5] Fix AUX buffer for page alignment

2014-10-23 Thread Zhenyu Wang
Apply ALIGN() for aux buffer size from beginning has no effect. Move to the end of all state offsets set for page alignment. v2: Update comments Signed-off-by: Zhenyu Wang --- src/intel/intel_gpgpu.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/intel/intel_gp

[Beignet] [PATCH v2 1/5] Make use of write enable flag for mem bo map

2014-10-23 Thread Zhenyu Wang
Use drm/intel optimization for mem bo mapping in case of read or write. So we could be possibly waiting less. This also adds 'map_flags' check in clEnqueueMapBuffer/clEnqueueMapImage for actual read or write mapping. But currently leave clMapBufferIntel untouched which might break ABI/API. v2: F

[Beignet] OpenCV Morph OCL Perf case is crash based on beignet

2014-10-23 Thread yan . wang
Hi, All, Today I tried the latest opencv code (3.0 master) and found morph perf case will crash when test CV_8UC1 type only. The case number is the following: opencv_perf_imgproc --gtest_filter=OCL_MorphologyExFixture_MorphologyEx.MorphologyEx/4. Its operation type is MORPHY_GRADIENT. I d