[Beignet] FreeBSD port: failing unit tests

Zhigang Gong zhigang.gong at linux.intel.com
Wed Feb 4 01:51:48 PST 2015


On Wed, Feb 04, 2015 at 12:05:03AM +0100, Johannes Dieterich wrote:
> Dear list,
> 
> the weird C++ template issue I was hitting when I reported my earlier
> attempts to port beignet to FreeBSD turned out to be an issue with our
> libc++ which have since been resolved by an import of a newer upstream
> version.
> 
> Also, our graphics/X11 team in person of Koop Mast has recently
> started OpenCL ports and we made huge steps forward. Koop has started
> upstreaming patches/bug reports against your git-master that were
> needed to compile Beignet on FreeBSD, we hope you will consider them
> for inclusion as they mostly improve standards compliance in a
> non-intrusive manner.
That's great. We'd be happy to review those patches.

> 
> As of yesterday beignet compiles on FreeBSD, see
> https://wiki.freebsd.org/Graphics/OpenCL for an output of clinfo on my
> Ivy notebook. The current port status can be found on github:
> https://github.com/freebsd/freebsd-ports-graphics/tree/opencl/lang/beignet
> . Once it works properly, it will be included into the FreeBSD ports
> tree making beignet a first class citizen on FreeBSD! :-)
Great news.

> 
> However, there are still some problems to be sorted out before as
> exposed by your unit test framework and I hope you can give me some
> pointers why these particular tests fail so that we can fix the
> issue(s). Out of the 726 unit tests, some 68 fail. Most of them show
> unresolved symbols of the compiled OCL kernel like so:
> 
> runtime_climage_from_boname()Unresolved symbol:
> _Z22__gen_ocl_write_imagef11ocl_image2dDv2_iDv4_f
> Aborting...

Looks like still a c++ related system problem. The symbol should be demangled
to __gen_ocl_write_imagef. Please see my result in my system:

$ c++filt _Z22__gen_ocl_write_imagef11ocl_image2dDv2_iDv4_f
__gen_ocl_write_imagef(ocl_image2d, int __vector(2), float __vector(4))

__gen_ocl_write_imagef is defined in backend/src/libocl/src/ocl_image.cl.

You could further check the following code in llvm_gen_backend.hpp:

      if (it == map.end()) {
        int status;
        const char *realName = abi::__cxa_demangle(symbol.c_str(), NULL, NULL, &status);
        if (status == 0) {
          std::string realFnName(realName), stripName;
          stripName = realFnName.substr(0, realFnName.find("("));
          it = map.find(stripName);
        }
      }

To check whether the status is 0. If it is then check whether the realName is "__gen_ocl_write_imagef".

All the following failures may be caused by this issue.

Thanks,
Zhigang Gong.

> 
> This is the full list of failed unit tests:
> 
> failed runtime_climage_from_boname
> failed compiler_fill_image_2d_array
> failed compiler_fill_image_1d_array
> failed compare_image_2d_and_1d_array
> failed image_1D_buffer
> failed builtin_kernel_max_global_size
> failed profiling_exec
> failed compiler_copy_image1
> failed compiler_movforphi_undef
> failed compiler_fill_image_3d_2
> failed compiler_fill_image_3d
> failed compiler_fill_image_1d
> failed compiler_fill_image0
> failed compiler_fill_image
> failed compiler_abs_int
> failed compiler_abs_short
> failed compiler_abs_char
> failed compiler_abs_uint
> failed compiler_abs_ushort
> failed compiler_abs_uchar
> failed compiler_abs_int2
> failed compiler_abs_int3
> failed compiler_abs_int4
> failed compiler_abs_int8
> failed compiler_abs_int16
> failed compiler_abs_uint2
> failed compiler_abs_uint3
> failed compiler_abs_uint4
> failed compiler_abs_uint8
> failed compiler_abs_uint16
> failed compiler_abs_char2
> failed compiler_abs_char3
> failed compiler_abs_char4
> failed compiler_abs_char8
> failed compiler_abs_char16
> failed compiler_abs_uchar2
> failed compiler_abs_uchar3
> failed compiler_abs_uchar4
> failed compiler_abs_uchar8
> failed compiler_abs_uchar16
> failed compiler_abs_short2
> failed compiler_abs_short3
> failed compiler_abs_short4
> failed compiler_abs_short8
> failed compiler_abs_short16
> failed compiler_abs_ushort2
> failed compiler_abs_ushort3
> failed compiler_abs_ushort4
> failed compiler_abs_ushort8
> failed compiler_abs_ushort16
> failed compiler_copy_image_3d
> failed compiler_copy_image_1d
> failed compiler_copy_image
> failed compiler_popcount_int8_t
> failed compiler_popcount_uint8_t
> failed compiler_popcount_int16_t
> failed compiler_popcount_uint16_t
> failed compiler_popcount_int32_t
> failed compiler_popcount_uint32_t
> failed compiler_popcount_int64_t
> failed compiler_popcount_uint64_t
> failed compiler_box_blur_image
> failed builtin_ilogb_float16
> failed builtin_ilogb_float8
> failed builtin_ilogb_float4
> failed builtin_ilogb_float2
> failed builtin_ilogb_float
> failed enqueue_built_in_kernels
> 
> Do these share a common denominator that points to a particular
> problem in the compilation? Even something as trivial as the same
> cmake compile command, or... I looked but was unsuccessful to
> determine anything.
> 
> Let me know if you need more information, I'll be happy to provide it.
> 
> Thanks a lot
> 
> Johannes
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list