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

Method transferOutputToHost

samples/common/sampleInference.cpp:1458–1474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1456}
1457
1458void Bindings::transferOutputToHost(TrtCudaStream& stream)
1459{
1460 for (auto& b : mNames)
1461 {
1462 if (!mBindings[b.second].isInput)
1463 {
1464 if (mBindings[b.second].outputAllocator != nullptr)
1465 {
1466 mBindings[b.second].outputAllocator->getBuffer()->deviceToHost(stream);
1467 }
1468 else
1469 {
1470 mBindings[b.second].buffer->deviceToHost(stream);
1471 }
1472 }
1473 }
1474}
1475
1476template <>
1477void Bindings::dumpBindingValues<nvinfer1::IExecutionContext>(nvinfer1::IExecutionContext const& context, int32_t binding, std::ostream& os,

Callers 1

fetchOutputDataMethod · 0.80

Calls 2

deviceToHostMethod · 0.45
getBufferMethod · 0.45

Tested by

no test coverage detected