MCPcopy Create free account
hub / github.com/Tencent/TNN / BuildProgram

Method BuildProgram

source/tnn/device/opencl/opencl_runtime.cc:473–484  ·  view source on GitHub ↗

build program with build options

Source from the content-addressed store, hash-verified

471
472//build program with build options
473bool OpenCLRuntime::BuildProgram(const std::string &build_options, cl::Program *program) {
474 cl_int ret = program->build({*device_}, build_options.c_str());
475 if (ret != CL_SUCCESS) {
476 if (program->getBuildInfo<CL_PROGRAM_BUILD_STATUS>(*device_) == CL_BUILD_ERROR) {
477 std::string build_log = program->getBuildInfo<CL_PROGRAM_BUILD_LOG>(*device_);
478 LOGE("Program build log: %s \n", build_log.c_str());
479 }
480 LOGE("Build program failed ! \n");
481 return false;
482 }
483 return true;
484}
485
486Status OpenCLRuntime::LoadProgramCache() {
487#ifdef __ANDROID__

Callers 2

BuildKernelMethod · 0.95
LoadProgramCacheMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected