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

Method GetBinary

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

Source from the content-addressed store, hash-verified

124}
125
126Status CLProgram::GetBinary(std::vector<uint8_t>* result) const {
127 size_t binary_size;
128 RETURN_IF_ERROR(GetBinarySize(program_, &binary_size));
129 result->resize(result->size() + binary_size);
130 uint8_t* binary_ptr = result->data() + result->size() - binary_size;
131 cl_int error_code = clGetProgramInfo(program_, CL_PROGRAM_BINARIES,
132 binary_size, &binary_ptr, nullptr);
133 if (error_code != CL_SUCCESS) {
134 return UnknownError(absl::StrCat("Failed to get program binary - ",
135 CLErrorCodeToString(error_code)));
136 }
137 return OkStatus();
138}
139
140Status CreateCLProgram(const std::string& code,
141 const std::string& compiler_options,

Callers 1

GetSerializedCacheMethod · 0.45

Calls 8

GetBinarySizeFunction · 0.85
CLErrorCodeToStringFunction · 0.85
OkStatusFunction · 0.85
UnknownErrorFunction · 0.50
StrCatFunction · 0.50
resizeMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected