[Beignet] [PATCH 2/5] GBE: don't assert even if we fail to compile kernel at the backend stage.

Gong, Zhigang zhigang.gong at intel.com
Mon Nov 16 19:04:52 PST 2015


The ”error“ is the error message pointer which passed in to this function.
Thus the caller will get the error message. It is just as other compilation error or warning messages.


> -----Original Message-----
> From: Song, Ruiling
> Sent: Tuesday, November 17, 2015 10:29 AM
> To: Gong, Zhigang <zhigang.gong at intel.com>; beignet at lists.freedesktop.org
> Cc: Gong, Zhigang <zhigang.gong at intel.com>
> Subject: RE: [Beignet] [PATCH 2/5] GBE: don't assert even if we fail to compile
> kernel at the backend stage.
> 
> 
> 
> >
> >    bool Program::buildFromUnit(const ir::Unit &unit, std::string
> > &error) { @@ -158,6 +161,13 @@ namespace gbe {
> >      for (const auto &pair : set) {
> >        const std::string &name = pair.first;
> >        Kernel *kernel = this->compileKernel(unit, name,
> > !OCL_STRICT_CONFORMANCE);
> > +      if (!kernel) {
> > +        error +=  name;
> > +        error += ":(GBE): error: failed in Gen backend.\n";
> > +        if (OCL_OUTPUT_BUILD_LOG)
> > +          llvm::errs() << error;
> > +        return false;
> > +      }
> I think we can output the errCode in the error log. That would be more
> meaningful. But the patch now is acceptable, we can add it later.
> And the whole patchset LGTM.
> 
> Thanks!
> Ruiling



More information about the Beignet mailing list