| 330 | } |
| 331 | |
| 332 | void getLayerOutputTypes(Arguments& arguments, char const* argument, LayerOutputTypes& layerOutputTypes) |
| 333 | { |
| 334 | std::string list; |
| 335 | if (!getAndDelOption(arguments, argument, list)) |
| 336 | { |
| 337 | return; |
| 338 | } |
| 339 | |
| 340 | // The layerOutputTypes flag contains comma-separated layerName:types pairs. |
| 341 | std::vector<std::string> precisionList{splitToStringVec(list, ',')}; |
| 342 | for (auto const& s : precisionList) |
| 343 | { |
| 344 | auto namePrecisionPair = splitNameAndValue<std::string>(s); |
| 345 | auto const layerName = removeSingleQuotationMarks(namePrecisionPair.first); |
| 346 | auto const typeStrings = splitToStringVec(namePrecisionPair.second, '+'); |
| 347 | std::vector<nvinfer1::DataType> typeVec(typeStrings.size(), nvinfer1::DataType::kFLOAT); |
| 348 | std::transform(typeStrings.begin(), typeStrings.end(), typeVec.begin(), stringToValue<nvinfer1::DataType>); |
| 349 | layerOutputTypes[layerName] = typeVec; |
| 350 | } |
| 351 | } |
| 352 | |
| 353 | void getLayerDeviceTypes(Arguments& arguments, char const* argument, LayerDeviceTypes& layerDeviceTypes) |
| 354 | { |
no test coverage detected