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

Function setLayerDeviceTypes

samples/common/sampleEngines.cpp:636–649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

634}
635
636void setLayerDeviceTypes(
637 INetworkDefinition const& network, IBuilderConfig& config, LayerDeviceTypes const& layerDeviceTypes)
638{
639 for (int32_t layerIdx = 0; layerIdx < network.getNbLayers(); ++layerIdx)
640 {
641 auto* layer = network.getLayer(layerIdx);
642 auto const layerName = layer->getName();
643 if (layerDeviceTypes.find(layerName) != layerDeviceTypes.end())
644 {
645 DeviceType const deviceType = layerDeviceTypes.at(layerName);
646 config.setDeviceType(layer, deviceType);
647 }
648 }
649}
650
651void setMemoryPoolLimits(IBuilderConfig& config, BuildOptions const& build)
652{

Callers 1

setupNetworkAndConfigFunction · 0.85

Calls 5

getLayerMethod · 0.80
setDeviceTypeMethod · 0.80
getNbLayersMethod · 0.45
getNameMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected