MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / infer_shapes

Function infer_shapes

python/src/infer/pyCore.cpp:109–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107 };
108
109std::vector<char const*> infer_shapes(IExecutionContext& self)
110{
111 int32_t const size{self.getEngine().getNbIOTensors()};
112 std::vector<char const*> names(size);
113 int32_t const nbNames = self.inferShapes(names.size(), names.data());
114
115 if (nbNames < 0)
116 {
117 std::stringstream msg;
118 msg << "infer_shapes error code: " << nbNames;
119 utils::throwPyError(PyExc_RuntimeError, msg.str().c_str());
120 }
121
122 names.resize(nbNames);
123 return names;
124}
125
126bool execute_async_v3(IExecutionContext& self, size_t streamHandle)
127{

Callers 5

run_const_fold_passMethod · 0.85
test_modelMethod · 0.85
test_pathMethod · 0.85
test_external_dataMethod · 0.85

Calls 6

throwPyErrorFunction · 0.85
inferShapesMethod · 0.80
c_strMethod · 0.80
sizeMethod · 0.45
dataMethod · 0.45
resizeMethod · 0.45

Tested by 4

test_modelMethod · 0.68
test_pathMethod · 0.68
test_external_dataMethod · 0.68