[Beignet] build problems: ASSERTION FAILED: Fail to create the gen context

Zhigang Gong zhigang.gong at linux.intel.com
Mon Jul 7 18:03:54 PDT 2014


On Tue, Jul 08, 2014 at 12:34:08AM +0800, Yichao Yu wrote:
> On Mon, Jul 7, 2014 at 9:16 AM, Zhigang Gong
> <zhigang.gong at linux.intel.com> wrote:
> >> -----Original Message-----
> >> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> >> Igor Gnatenko
> >> Sent: Friday, July 4, 2014 7:53 PM
> >> To: Zhigang Gong
> >> Cc: Adel Gadllah; An open source open CL implemenation for Intel platform
> >> Subject: Re: [Beignet] build problems: ASSERTION FAILED: Fail to create the gen
> >> context
> >>
> >> Hi,
> >> On Fri, 2014-07-04 at 14:09 +0800, Zhigang Gong wrote:
> >> > On Fri, Jul 04, 2014 at 07:53:42AM +0200, Adel Gadllah wrote:
> >> > > Zhigang Gong:
> >> > > >On Fri, Jul 04, 2014 at 01:33:14AM +0400, Igor Gnatenko wrote:
> >> > > >>Hi,
> >> > > >>
> >> > > >>I've long time no tested beignet builds. Now I've updated it to
> >> > > >>0.9.0 in Fedora rawhide[0].
> >> > > >>
> >> > > >>And it failed to build.
> >> > > >>
> >> > > >>Generating ../../utests/../kernels/compiler_ceil.bin
> >> > > >>Unknown opt
> >> > > >>/builddir/build/BUILD/Beignet-0.9.0-Source/build/backend/src/gbe_bin_g
> >> enerater: option requires an argument -- 't'
> >> > > >>
> >> > > >>ASSERTION FAILED: Fail to create the gen context
> >> > > >>   at
> >> > > >>file
> >> > > >>/builddir/build/BUILD/Beignet-0.9.0-Source/backend/src/backend/gen
> >> > > >>_program.cpp, function virtual gbe::Kernel*
> >> > > >>gbe::GenProgram::compileKernel(const gbe::ir::Unit&, const
> >> > > >>string&, bool), line 167
> >> > > >>
> >> > > >>And etc. I'm attaching FULL build log.
> >> > > >>
> >> > > >>[0]http://pkgs.fedoraproject.org/cgit/beignet.git/commit/?id=0c45e
> >> > > >>57cbecf72e1a5f243bbc0f375e3f19a2b03
> >> > > >>--
> >> > > >>-Igor Gnatenko
> >> > > >
> >> > > >>/builddir/build/BUILD/Beignet-0.9.0-Source/src/GetGenID.sh: line
> >> > > >>3: lspci: command not found
> >> > > >>-- Platform Gen PCI id is
> >> > > >The root cause is that now beignet will build internal binary
> >> > > >kernels according current build host's Gen VGA PCI id.
> >> > > This can't work for distributions that want to ship beignet. The
> >> > > system it gets build on is not the one it runs on. Also distribution
> >> > > build systems tend to be virtual machines that do not have any real
> >> > > (or intel) vga hardware.
> >> > You are right, this is a problem for distributions. I just realized
> >> > this issue when I replied to Igor. We will discuss how to make it friendly for
> >> package maintainer soon.
> >> Why do we need find out VGA PCI id?
> > As beignet need to generate binary code for builtin kernels, and currently beignet choose to generate the target binary code directly.
> > We are considering to change this behavior to generate llvm bitcode level binary code for the internal kernels. Then we can fix this
> > Issue completely.
> >> > Thanks for pointing this out.
> 
> In the mean time, wouldn't it be nice to also fail explicitly when no
> valid PCI id is found? (got a error report[1] caused by this and it
> took some iterations to pin the error)
> 
> [1] https://aur.archlinux.org/packages/beignet-git/

Thanks for your suggestion.
We will change this mechanism to the following soon:
1. Don't check Gen VGA PCI id at build time, and only build a llvm bit code library at build time.
2. Check the Gen VGA PCI id at runtime, and if can't get a supported pci id it will fail immediately.

> 
> >>
> >> --
> >> -Igor Gnatenko
> >
> > _______________________________________________
> > Beignet mailing list
> > Beignet at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/beignet
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list