MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / GetProgramBuildInfo

Function GetProgramBuildInfo

tensorflow/lite/delegates/gpu/cl/cl_program.cc:32–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30namespace {
31
32std::string GetProgramBuildInfo(cl_program program, cl_device_id id,
33 cl_program_build_info info) {
34 size_t size;
35 cl_int error_code =
36 clGetProgramBuildInfo(program, id, info, 0, nullptr, &size);
37 if (error_code != CL_SUCCESS) {
38 return absl::StrCat("Failed to GetProgramBuildInfo - ",
39 CLErrorCodeToString(error_code));
40 }
41
42 std::string result(size - 1, 0);
43 error_code =
44 clGetProgramBuildInfo(program, id, info, size, &result[0], nullptr);
45 if (error_code != CL_SUCCESS) {
46 return absl::StrCat("Failed to GetProgramBuildInfo - ",
47 CLErrorCodeToString(error_code));
48 }
49 return result;
50}
51
52Status GetBinarySize(cl_program program, size_t* binary_size) {
53 cl_int error_code = clGetProgramInfo(program, CL_PROGRAM_BINARY_SIZES,

Callers 1

BuildProgramFunction · 0.85

Calls 2

CLErrorCodeToStringFunction · 0.85
StrCatFunction · 0.50

Tested by

no test coverage detected