| 385 | } |
| 386 | |
| 387 | bool 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 | |
| 402 | void fillShapes(BuildOptions::ShapeProfile& shapes, std::string const& name, ShapeRange const& sourceShapeRange, |
| 403 | nvinfer1::OptProfileSelector minDimsSource, nvinfer1::OptProfileSelector optDimsSource, |
no test coverage detected