MCPcopy Create free account
hub / github.com/OAID/Tengine / ReleaseTensors

Function ReleaseTensors

executor/lib/custom_kernel.cpp:104–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void ReleaseTensors(Node* node, struct custom_kernel_tensor** k_inputs, int input_num,
105 struct custom_kernel_tensor** k_outputs, int output_num)
106{
107 if(k_inputs != nullptr)
108 {
109 for(int i = 0; i < input_num; i++)
110 {
111 if(k_inputs[i] != nullptr)
112 free(k_inputs[i]);
113 }
114
115 free(k_inputs);
116 }
117
118 if(k_outputs != nullptr)
119 {
120 for(int i = 0; i < output_num; i++)
121 {
122 if(k_outputs[i] != nullptr)
123 free(k_outputs[i]);
124 }
125
126 free(k_outputs);
127 }
128}
129
130static bool CheckBind(Node* node, struct custom_kernel_ops* ops)
131{

Callers 4

CheckBindFunction · 0.85
ReshapeMethod · 0.85
PostrunMethod · 0.85
ReleaseTensorsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected