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

Function context_get_shape

python/src/infer/pyCore.cpp:161–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159};
160
161std::vector<int32_t> context_get_shape(IExecutionContext& self, int32_t binding)
162{
163 Dims const shapeOfShape = self.getBindingDimensions(binding);
164 auto const numVals(utils::volume(shapeOfShape));
165 PY_ASSERT_RUNTIME_ERROR(numVals > 0, "Negative values in shape.");
166 std::vector<int32_t> shape(static_cast<std::size_t>(numVals));
167 PY_ASSERT_RUNTIME_ERROR(self.getShapeBinding(binding, shape.data()), "Error in get shape bindings.");
168 return shape;
169};
170
171void set_aux_streams(IExecutionContext& self, std::vector<size_t> streamHandle)
172{

Callers

nothing calls this directly

Calls 4

getShapeBindingMethod · 0.80
volumeFunction · 0.50
getBindingDimensionsMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected