|
|
Go to the documentation of this file.
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();
static const std::string input
const HitContainer *__restrict__ const TkSoA *__restrict__ const Quality *__restrict__ const CAHitNtupletGeneratorKernelsGPU::HitToTuple *__restrict__ int32_t int iev
cms::cuda::device::unique_ptr< float[]> runAlgo(const std::string &label, cudaStream_t stream) const
cms::cuda::device::unique_ptr< float[]> devicePtr_
unique_ptr< ClusterSequence > cs
cudaStream_t stream() const
std::unique_ptr< T, impl::HostDeleter > unique_ptr
cms::cuda::ContextState ctxState_
TestCUDAProducerGPUEWTask(edm::ParameterSet const &iConfig)
void acquire(edm::Event const &iEvent, edm::EventSetup const &iSetup, edm::WaitingTaskWithArenaHolder waitingTaskHolder) override
#define DEFINE_FWK_MODULE(type)
void addSimpleWork(edm::EventNumber_t eventID, edm::StreamID streamID, cms::cuda::ScopedContextTask &ctx)
cms::cuda::host::noncached::unique_ptr< float > hostData_
unsigned long long EventNumber_t
const edm::EDPutTokenT< cms::cuda::Product< cms::cudatest::Thing > > dstToken_
const edm::EDGetTokenT< cms::cuda::Product< cms::cudatest::Thing > > srcToken_
void runSimpleAlgo(float *d_data, cudaStream_t stream) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void setComment(std::string const &value)
~TestCUDAProducerGPUEWTask() override=default
TestCUDAProducerGPUKernel gpuAlgo_
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
#define cudaCheck(ARG,...)
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)