Bug 90931

Summary: Utest failed (async_copy, local_memory)
Product: Beignet Reporter: Bogdasarov Bogdan <bogdan>
Component: BeignetAssignee: Zhigang Gong <zhigang.gong>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: high CC: bogdan, zhigang.gong
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Utest Report file

Description Bogdasarov Bogdan 2015-06-11 07:01:14 UTC
Created attachment 116428 [details]
Utest Report file

System:
Ubuntu 14.04  (kernel 3.13.0-53-generic)
CPU: Intel(R) Core(TM) i5-4200M
GPU: Intel(R) HD Graphics Haswell GT2 Mobile

Version:  OpenCL 1.2 beignet 1.1 (git-48e22ae)
--------------------------

This tests failed on my system:

compiler_atomic_functions()    [FAILED]
compiler_async_copy_char2()    [FAILED]
compiler_async_copy_uchar2()    [FAILED]
compiler_async_copy_short2()    [FAILED]
compiler_async_copy_ushort2()    [FAILED]
compiler_async_copy_int2()    [FAILED]
compiler_async_copy_uint2()    [FAILED]
compiler_async_copy_long2()    [FAILED]
compiler_async_copy_ulong2()    [FAILED]
compiler_async_copy_float2()    [FAILED]
compiler_async_stride_copy()    [FAILED]
compiler_load_bool_imm()    [FAILED]
compiler_local_memory_two_ptr()    [FAILED]
compiler_local_memory_barrier()    [FAILED]
compiler_local_memory_barrier_wg64()    [FAILED]
compiler_local_memory_barrier_2()    [FAILED]
compiler_local_slm()    [FAILED]
compiler_getelementptr_bitcast()    [FAILED]

I was tried both GCC and Clang 3.5 for compilation. 

I was also compiled kernel with path for shared local memory (as described here http://arrayfire.com/opencl-on-intel-hd-iris-graphics-on-linux/). But how I can check it's really installed?

My main problem is this version do not work correctly in Blender 2.74 with Cycles Render. It produce corrupted color less image.
Comment 1 Bogdasarov Bogdan 2015-06-11 07:06:25 UTC
Also I get this error when I run "clinfo"

Beignet: self-test failed: (3, 7, 5) + (5, 7, 3) returned (3, 7, 5)
Beignet: Warning - overriding self-test failure
Comment 2 Zhigang Gong 2015-06-11 09:47:03 UTC
Self test failed means the SLM doesn't work correctly. Please check the README.md's known issue section:

* "Beignet: self-test failed" and 15-30 unit tests fail on 4th Generation (Haswell) hardware.
  On Haswell, shared local memory (\_\_local) does not work at all on
  Linux <= 4.0, and requires the i915.enable_ppgtt=2 [boot parameter](https://wiki.ubuntu.com/Kernel/KernelBootParameters)
  on Linux 4.1.

  This will be fixed in Linux 4.2; older versions can be fixed with
  [this patch](https://01.org/zh/beignet/downloads/linux-kernel-patch-hsw-support).

  If you do not need \_\_local, you can override the self-test with

  `export OCL_IGNORE_SELF_TEST=1`

  but using \_\_local after this may silently give wrong results.


Please make sure you are using latest linux kernel for HSW machine.
Comment 3 Bogdasarov Bogdan 2015-06-11 10:41:44 UTC
I already done all I can from things described in Readme.md. I recompiled kernel with provide patch, but this does not change anything. What else I can do? Does Beignet will work correctly in Blender with new linux kernel 4.2? 

P.S. But I'm not sure that the kernel I compiled and installed via dpkg is actually in use. It must be, but I don't know how to check this. I will try to figure it out.
Comment 4 Bogdasarov Bogdan 2015-06-13 13:28:35 UTC
[FIXED]

Solution: 

1) Recompile linux kernel with provided path for _local as described in Readme.md.

2) Install kernel correctly (*do not miss any packages). 
In my case I was missed linux-headers-XXXX_all.deb

For me it was:

linux-headers-3.13.0-53_3.13.0-53.89_all.deb
linux-headers-3.13.0-53-generic_3.13.0-53.89_amd64.deb
linux-image-3.13.0-53-generic_3.13.0-53.89_amd64.deb
linux-image-extra-3.13.0-53-generic_3.13.0-53.89_amd64.deb
Comment 5 Bogdasarov Bogdan 2015-06-13 13:28:55 UTC
[FIXED]

Solution: 

1) Recompile linux kernel with provided path for _local as described in Readme.md.

2) Install kernel correctly (*do not miss any packages). 
In my case I was missed linux-headers-XXXX_all.deb

For me it was:

linux-headers-3.13.0-53_3.13.0-53.89_all.deb
linux-headers-3.13.0-53-generic_3.13.0-53.89_amd64.deb
linux-image-3.13.0-53-generic_3.13.0-53.89_amd64.deb
linux-image-extra-3.13.0-53-generic_3.13.0-53.89_amd64.deb

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.