|
|
@ -3574,6 +3574,7 @@ struct Program::Impl |
|
|
|
// We don't cache OpenCL binaries
|
|
|
|
// We don't cache OpenCL binaries
|
|
|
|
if (src_->kind_ == ProgramSource::Impl::PROGRAM_BINARIES) |
|
|
|
if (src_->kind_ == ProgramSource::Impl::PROGRAM_BINARIES) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
CV_LOG_VERBOSE(NULL, 0, "Load program binary... " << src_->module_.c_str() << "/" << src_->name_.c_str()); |
|
|
|
bool isLoaded = createFromBinary(ctx, src_->sourceAddr_, src_->sourceSize_, errmsg); |
|
|
|
bool isLoaded = createFromBinary(ctx, src_->sourceAddr_, src_->sourceSize_, errmsg); |
|
|
|
return isLoaded; |
|
|
|
return isLoaded; |
|
|
|
} |
|
|
|
} |
|
|
@ -3615,6 +3616,7 @@ struct Program::Impl |
|
|
|
if (res) |
|
|
|
if (res) |
|
|
|
{ |
|
|
|
{ |
|
|
|
CV_Assert(!binaryBuf.empty()); |
|
|
|
CV_Assert(!binaryBuf.empty()); |
|
|
|
|
|
|
|
CV_LOG_VERBOSE(NULL, 0, "Load program binary from cache: " << src_->module_.c_str() << "/" << src_->name_.c_str()); |
|
|
|
bool isLoaded = createFromBinary(ctx, binaryBuf, errmsg); |
|
|
|
bool isLoaded = createFromBinary(ctx, binaryBuf, errmsg); |
|
|
|
if (isLoaded) |
|
|
|
if (isLoaded) |
|
|
|
return true; |
|
|
|
return true; |
|
|
@ -3646,6 +3648,7 @@ struct Program::Impl |
|
|
|
{ |
|
|
|
{ |
|
|
|
buildflags = joinBuildOptions(buildflags, " -spir-std=1.2"); |
|
|
|
buildflags = joinBuildOptions(buildflags, " -spir-std=1.2"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
CV_LOG_VERBOSE(NULL, 0, "Load program SPIR binary... " << src_->module_.c_str() << "/" << src_->name_.c_str()); |
|
|
|
bool isLoaded = createFromBinary(ctx, src_->sourceAddr_, src_->sourceSize_, errmsg); |
|
|
|
bool isLoaded = createFromBinary(ctx, src_->sourceAddr_, src_->sourceSize_, errmsg); |
|
|
|
if (!isLoaded) |
|
|
|
if (!isLoaded) |
|
|
|
return false; |
|
|
|
return false; |
|
|
@ -3816,7 +3819,7 @@ struct Program::Impl |
|
|
|
{ |
|
|
|
{ |
|
|
|
CV_Assert(handle == NULL); |
|
|
|
CV_Assert(handle == NULL); |
|
|
|
CV_INSTRUMENT_REGION_OPENCL_COMPILE("Load OpenCL program"); |
|
|
|
CV_INSTRUMENT_REGION_OPENCL_COMPILE("Load OpenCL program"); |
|
|
|
CV_LOG_VERBOSE(NULL, 0, "Load from binary... " << src.getImpl()->module_.c_str() << "/" << src.getImpl()->name_.c_str()); |
|
|
|
CV_LOG_VERBOSE(NULL, 0, "Load from binary... (" << binarySize << " bytes)"); |
|
|
|
|
|
|
|
|
|
|
|
CV_Assert(binarySize > 0); |
|
|
|
CV_Assert(binarySize > 0); |
|
|
|
|
|
|
|
|
|
|
|