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

Function CreateStaticTensor

core/lib/static_graph.cpp:398–410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396}
397
398StaticTensor* CreateStaticTensor(StaticGraph* graph, const std::string& name)
399{
400 int tensor_idx = graph->tensor_list.size();
401
402 StaticTensorPtr tensor_ptr(new StaticTensor());
403
404 tensor_ptr->index = tensor_idx;
405 tensor_ptr->name = name;
406 tensor_ptr->type = kVarTensor;
407 graph->tensor_list.push_back(tensor_ptr);
408
409 return tensor_ptr.get();
410}
411
412void SetTensorDim(StaticTensor* tensor, const std::vector<int>& dims)
413{

Callers 13

LoadTensorMethod · 0.85
LoadTensorMethod · 0.85
LoadNodeMethod · 0.85
LoadLiteTensorMethod · 0.85
CreateInputNodeMethod · 0.85
LoadNodeMethod · 0.85
GenerateStaticGraphMethod · 0.85
CreateInputNodeFunction · 0.85
LoadTopkV2Function · 0.85
CreateInputNodeMethod · 0.85
LoadNodeMethod · 0.85
ConstructGraphMethod · 0.85

Calls 2

getMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected