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

Song, Ruiling ruiling.song at intel.com
Mon Nov 16 18:28:49 PST 2015



> 
>    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