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

Function GetWritingPart

tensorflow/lite/delegates/gpu/metal/kernels/conv.cc:134–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134std::string GetWritingPart(int num_output_slices) {
135 std::string code;
136 for (int d = 0; d < num_output_slices; ++d) {
137 code += absl::Substitute(R"(
138 {
139 int dst_address = int(gid.y) * params.size.z + int(gid.x);
140 FLT4 value = FLT4(sum$0) + temp[$0];
141 const int linear_index = gid.z * params.dillation_layer_offsets.w + dst_address;
142 $$2
143 dst_buffer[linear_index + params.z_offset.y] = value;
144 gid.z += 1;
145 })",
146 d);
147 }
148 return code;
149}
150
151std::string GetKernelForConv(const Convolution2DAttributes& params) {
152 const int num_output_slices = GetNumOutputSlices(params.weights.shape.o);

Callers 1

GetKernelForConvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected