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

Function getShapesBuild

samples/common/sampleOptions.cpp:371–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369}
370
371bool getShapesBuild(Arguments& arguments, BuildOptions::ShapeProfile& shapes, char const* argument,
372 nvinfer1::OptProfileSelector selector)
373{
374 std::string list;
375 bool retVal = getAndDelOption(arguments, argument, list);
376 std::vector<std::string> shapeList{splitToStringVec(list, ',')};
377 for (const auto& s : shapeList)
378 {
379 auto nameDimsPair = splitNameAndValue<std::vector<int32_t>>(s);
380 auto tensorName = removeSingleQuotationMarks(nameDimsPair.first);
381 auto dims = nameDimsPair.second;
382 insertShapesBuild(shapes, selector, tensorName, dims);
383 }
384 return retVal;
385}
386
387bool getShapesInference(Arguments& arguments, InferenceOptions::ShapeProfile& shapes, const char* argument)
388{

Callers 1

parseMethod · 0.85

Calls 4

getAndDelOptionFunction · 0.85
splitToStringVecFunction · 0.85
insertShapesBuildFunction · 0.85

Tested by

no test coverage detected