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

Function getShapesInference

samples/common/sampleOptions.cpp:387–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385}
386
387bool getShapesInference(Arguments& arguments, InferenceOptions::ShapeProfile& shapes, const char* argument)
388{
389 std::string list;
390 bool retVal = getAndDelOption(arguments, argument, list);
391 std::vector<std::string> shapeList{splitToStringVec(list, ',')};
392 for (const auto& s : shapeList)
393 {
394 auto nameDimsPair = splitNameAndValue<std::vector<int32_t>>(s);
395 auto tensorName = removeSingleQuotationMarks(nameDimsPair.first);
396 auto dims = nameDimsPair.second;
397 insertShapesInference(shapes, tensorName, dims);
398 }
399 return retVal;
400}
401
402void fillShapes(BuildOptions::ShapeProfile& shapes, std::string const& name, ShapeRange const& sourceShapeRange,
403 nvinfer1::OptProfileSelector minDimsSource, nvinfer1::OptProfileSelector optDimsSource,

Callers 1

parseMethod · 0.85

Calls 4

getAndDelOptionFunction · 0.85
splitToStringVecFunction · 0.85
insertShapesInferenceFunction · 0.85

Tested by

no test coverage detected