Re: [Beignet] [PATCH] Fix clLinkProgram error.

2015-09-21 Thread Luo, Xionghu
This patch LGTM. The p returned by cl_program_link should be checked NULL immediately, anyway this function is called several times in other place, I will send another patch to fix it. Luo Xionghu Best Regards -Original Message- From: Beignet

[Beignet] [PATCH 1/2] GBE: fix ub1grf(nr, subnr) issue.

2015-09-21 Thread Ruiling Song
suboffset() will not set .subnr correctly, as vec1() will get a horizontal stride 0 register. Signed-off-by: Ruiling Song --- backend/src/backend/gen_register.hpp | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

[Beignet] [PATCH 2/2] GBE: Minor refine uw1grf(nr, subnr).

2015-09-21 Thread Ruiling Song
let's just keep things simple. Signed-off-by: Ruiling Song --- backend/src/backend/gen_register.hpp | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/src/backend/gen_register.hpp b/backend/src/backend/gen_register.hpp index

[Beignet] [PATCH] Fix clLinkProgram error.

2015-09-21 Thread Yang Rong
All programs or none programs specified by input_programs contain a compiled binary or library for the device. Otherwise return CL_INVALID_OPERATION. Correct this condition check. Signed-off-by: Yang Rong --- src/cl_api.c | 2 +- src/cl_program.c | 43

[Beignet] [PATCH] should check the return value of cl_program_new.

2015-09-21 Thread xionghu . luo
From: Luo Xionghu catch the error: out of host memery. Signed-off-by: Luo Xionghu --- src/cl_program.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/cl_program.c b/src/cl_program.c index 0564b6f..82dd3e3 100644 ---

Re: [Beignet] [PATCH 5/5] GBE: implement further phi mov optimization based on intra-BB interefering analysis.

2015-09-21 Thread Song, Ruiling
I just think of another optimization opportunity that may be missed in your algorithm. As you use a map to record the possible to-be-coaleased pair. The phiCopySrc may be used in another phiNode in the same way. Which the algorithm would not record. We may do it later. Could

Re: [Beignet] Still getting "Failed to release test userptr object! (9) i915 kernel driver may not be sane!"

2015-09-21 Thread Pan, Xiuli
I have found this message was from drm and may be related to this patch http://cgit.freedesktop.org/mesa/drm/commit/?id=30921483c70c6939f017476eac13da6aa26b3b3c. And it was in drm just after 2.4.60, which I have tried that won't show this message(I am using mesa/drm master now). As the patch

Re: [Beignet] [PATCH 2/2] Fix DRM Memory leak BUG

2015-09-21 Thread Zhigang Gong
Nice catch! But may not be a correct fix. We don't need to do the blocking event updating all the time. We only need to do that when there is potential possibility to leak a event. If a event has a user call back function registered is such a case, and my best guessing here is: one event in the

Re: [Beignet] [PATCH 2/2] Fix DRM Memory leak BUG

2015-09-21 Thread Pan, Xiuli
I have looked into the clWaitForEvents function and read about ocl spec, maybe the uncompleted evnet in the last_event should not be there at all. It should be finished in the waitforevent function and be deleted and freed in the clReleaseEvent. My patch may cause unexpectable user function

Re: [Beignet] [PATCH] should check the return value of cl_program_new.

2015-09-21 Thread Yang, Rong R
LGTM, pushed, thanks. > -Original Message- > From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of > xionghu@intel.com > Sent: Monday, September 21, 2015 15:51 > To: beignet@lists.freedesktop.org > Cc: Luo, Xionghu > Subject: [Beignet] [PATCH] should check the

Re: [Beignet] [PATCH 2/2] GBE: Minor refine uw1grf(nr, subnr).

2015-09-21 Thread Yang, Rong R
Patchset LGTM, pushed, thanks. > -Original Message- > From: Beignet [mailto:beignet-boun...@lists.freedesktop.org] On Behalf Of > Ruiling Song > Sent: Monday, September 21, 2015 15:40 > To: beignet@lists.freedesktop.org > Cc: Song, Ruiling > Subject: [Beignet] [PATCH 2/2] GBE: Minor

[Beignet] [PATCH v2 1/2] Add extension clCreateBufferFromFdINTEL to create cl buffer by external buffer object's fd.

2015-09-21 Thread Chuanbo Weng
Before this patch, Beignet can only create cl buffer from external bo by its handle using clCreateBufferFromLibvaIntel. Render node is the first choice of accessing gpu in currect Beignet implementation. DRM_IOCTL_GEM_OPEN is used by clCreateBufferFromLibvaIntel but forbidden in Render node mode.

[Beignet] [PATCH v2 2/2] Add extension clCreateImageFromFdINTEL to create cl image by external fd.

2015-09-21 Thread Chuanbo Weng
Before this patch, Beignet can only create cl image from external bo by its handle using clCreateImageFromLibvaIntel. Render node is the first choice of accessing gpu in currect Beignet implementation. DRM_IOCTL_GEM_OPEN is used by clCreateBufferFromLibvaIntel but forbidden in Render node mode. So

[Beignet] [PATCH 2/2] Fix DRM Memory leak BUG

2015-09-21 Thread Pan Xiuli
This bug is cased by event flush, we should not only run usr event but also event made by enqueue functions. If the event haven't been completed before it is been overwite in the last_event, the related gpgpu buffer will not be unreference. And will cause all related drm buffers unreference and