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

Method Reshape

executor/lib/custom_kernel_ops.cpp:65–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65bool CustomKernelNodeOps::Reshape(Node* node)
66{
67 if(k_ops_->reshape == nullptr)
68 return true;
69
70 ReleaseTensors(node);
71
72 if(!PrepareTensors(node))
73 return false;
74
75 int ret = k_ops_->reshape(k_ops_, k_inputs_, input_num_, k_outputs_, output_num_);
76
77 if(ret < 0)
78 {
79 LOG_ERROR() << "custom kernel reshape failed on node: " << node->GetName() << "\n";
80 set_tengine_errno(EFAULT); // external error
81 return false;
82 }
83
84 return true;
85}
86
87bool CustomKernelNodeOps::Run(Node* node)
88{

Callers 5

Weight_BnFunction · 0.45
PredictMethod · 0.45
run_PNetMethod · 0.45
run_RNetMethod · 0.45
run_ONetMethod · 0.45

Calls 4

ReleaseTensorsFunction · 0.85
PrepareTensorsFunction · 0.85
set_tengine_errnoFunction · 0.85
GetNameMethod · 0.80

Tested by

no test coverage detected