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

Method sync

samples/common/sampleInference.cpp:757–775  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

755 }
756
757 float sync(
758 TimePoint const& cpuStart, TrtCudaEvent const& gpuStart, std::vector<InferenceTrace>& trace, bool skipTransfers)
759 {
760 if (mActive[mNext])
761 {
762 if (skipTransfers)
763 {
764 getEvent(EventType::kCOMPUTE_E).synchronize();
765 }
766 else
767 {
768 getEvent(EventType::kOUTPUT_E).synchronize();
769 }
770 trace.emplace_back(getTrace(cpuStart, gpuStart, skipTransfers));
771 mActive[mNext] = false;
772 return getEvent(EventType::kCOMPUTE_S) - gpuStart;
773 }
774 return 0;
775 }
776
777 void syncAll(
778 TimePoint const& cpuStart, TrtCudaEvent const& gpuStart, std::vector<InferenceTrace>& trace, bool skipTransfers)

Callers 1

Calls 1

synchronizeMethod · 0.45

Tested by

no test coverage detected