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

Method Compile

tensorflow/lite/delegates/gpu/cl/kernels/conv_texture.cc:234–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234Status ConvTexture::Compile(const CreationContext& creation_context) {
235 auto storage_type = definition_.GetPrimaryStorageType();
236 bool is1x1 = kernel_size_.x == 1 && kernel_size_.y == 1;
237 bool adreno4xx_optimization =
238 stride_.x == 1 && stride_.y == 1 && padding_.x == 0 && padding_.y == 0 &&
239 creation_context.device->IsAdreno4xx() &&
240 storage_type == TensorStorageType::TEXTURE_ARRAY &&
241 definition_.precision == CalculationsPrecision::F16;
242 std::string code = GenerateConvCode(
243 definition_.src_tensors[0], definition_.dst_tensors[0],
244 definition_.precision, is1x1, adreno4xx_optimization, linked_operations_);
245 std::vector<CompilerOptions> options;
246 if (UseFP16SIMD(*creation_context.device, definition_.precision, is1x1)) {
247 options.push_back(CompilerOptions::ADRENO_FULL_SIMD_LINE);
248 }
249 return creation_context.cache->GetOrCreateCLKernel(
250 code, "main_function", options, *creation_context.context,
251 *creation_context.device, &kernel_);
252}
253
254Status ConvTexture::BindArguments() {
255 kernel_.ResetBindingCounter();

Callers

nothing calls this directly

Calls 6

GenerateConvCodeFunction · 0.85
UseFP16SIMDFunction · 0.85
GetPrimaryStorageTypeMethod · 0.80
IsAdreno4xxMethod · 0.80
GetOrCreateCLKernelMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected