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

Function getLayerPrecisions

samples/common/sampleOptions.cpp:314–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312}
313
314void getLayerPrecisions(Arguments& arguments, char const* argument, LayerPrecisions& layerPrecisions)
315{
316 std::string list;
317 if (!getAndDelOption(arguments, argument, list))
318 {
319 return;
320 }
321
322 // The layerPrecisions flag contains comma-separated layerName:precision pairs.
323 std::vector<std::string> precisionList{splitToStringVec(list, ',')};
324 for (auto const& s : precisionList)
325 {
326 auto namePrecisionPair = splitNameAndValue<nvinfer1::DataType>(s);
327 auto const layerName = removeSingleQuotationMarks(namePrecisionPair.first);
328 layerPrecisions[layerName] = namePrecisionPair.second;
329 }
330}
331
332void getLayerOutputTypes(Arguments& arguments, char const* argument, LayerOutputTypes& layerOutputTypes)
333{

Callers 1

parseMethod · 0.85

Calls 3

getAndDelOptionFunction · 0.85
splitToStringVecFunction · 0.85

Tested by

no test coverage detected