50 srcToken_{consumes<cms::cuda::Product<cms::cudatest::Thing>>(iConfig.getParameter<
edm::InputTag>(
"src"))},
51 dstToken_{produces<cms::cuda::Product<cms::cudatest::Thing>>()} {
54 hostData_ = cms::cuda::make_host_noncached_unique<float>();
63 "This EDProducer is part of the TestCUDAProducer* family. It models a GPU algorithm this is not the first " 64 "algorithm in the chain of the GPU EDProducers, and that transfers some data from GPU to CPU multiple times " 65 "alternating the transfers and kernel executions (e.g. to decide which kernel to run next based on a value from " 66 "GPU). A synchronization between GPU and CPU is needed after each transfer. The synchronizations are implemented " 67 "with the ExternalWork extension and explicit TBB tasks within the module. Produces " 68 "cms::cuda::Product<cms::cudatest::Thing>.");
74 edm::LogVerbatim(
"TestCUDAProducerGPUEWTask") <<
label_ <<
" TestCUDAProducerGPUEWTask::acquire begin event " 75 <<
iEvent.id().event() <<
" stream " <<
iEvent.streamID();
94 edm::LogVerbatim(
"TestCUDAProducerGPUEWTask") <<
label_ <<
" TestCUDAProducerGPUEWTask::acquire end event " 95 <<
iEvent.id().event() <<
" stream " <<
iEvent.streamID();
103 <<
label_ <<
" TestCUDAProducerGPUEWTask::addSimpleWork begin event " << eventID <<
" stream " << streamID
104 <<
" 10th element " << *
hostData_ <<
" not satisfied, queueing more work";
112 <<
label_ <<
" TestCUDAProducerGPUEWTask::addSimpleWork end event " << eventID <<
" stream " << streamID;
115 <<
label_ <<
" TestCUDAProducerGPUEWTask::addSimpleWork event " << eventID <<
" stream " << streamID
116 <<
" 10th element " << *
hostData_ <<
" not queueing more work";
122 <<
label_ <<
" TestCUDAProducerGPUEWTask::produce begin event " <<
iEvent.id().event() <<
" stream " 132 edm::LogVerbatim(
"TestCUDAProducerGPUEWTask") <<
label_ <<
" TestCUDAProducerGPUEWTask::produce end event " 133 <<
iEvent.id().event() <<
" stream " <<
iEvent.streamID();
Log< level::Info, true > LogVerbatim
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
void runSimpleAlgo(float *d_data, cudaStream_t stream) const
unsigned long long EventNumber_t
TkSoAView< TrackerTraits > HitToTuple< TrackerTraits > const *__restrict__ int32_t int32_t int iev
~TestCUDAProducerGPUEWTask() override=default
TestCUDAProducerGPUKernel gpuAlgo_
std::unique_ptr< T, impl::HostDeleter > unique_ptr
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
static std::string const input
cms::cuda::host::noncached::unique_ptr< float > hostData_
cms::cuda::device::unique_ptr< float[]> devicePtr_
TestCUDAProducerGPUEWTask(edm::ParameterSet const &iConfig)
#define DEFINE_FWK_MODULE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void acquire(edm::Event const &iEvent, edm::EventSetup const &iSetup, edm::WaitingTaskWithArenaHolder waitingTaskHolder) override
edm::EDPutTokenT< cms::cuda::Product< cms::cudatest::Thing > > const dstToken_
void setComment(std::string const &value)
cms::cuda::ContextState ctxState_
edm::EDGetTokenT< cms::cuda::Product< cms::cudatest::Thing > > const srcToken_
cms::cuda::device::unique_ptr< float[]> runAlgo(const std::string &label, cudaStream_t stream) const
#define cudaCheck(ARG,...)
cudaStream_t stream() const
void addSimpleWork(edm::EventNumber_t eventID, edm::StreamID streamID, cms::cuda::ScopedContextTask &ctx)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override