44 dstToken_{produces<cms::cuda::Product<cms::cudatest::Thing>>()} {
47 hostData_ = cms::cuda::make_host_noncached_unique<float>();
56 "This EDProducer is part of the TestCUDAProducer* family. It models a GPU algorithm this is not the first "
57 "algorithm in the chain of the GPU EDProducers, and that transfers some data from GPU to CPU and thus needs to "
58 "synchronize GPU and CPU. The synchronization is implemented with the ExternalWork extension. Produces "
59 "cms::cuda::Product<cms::cuda::Thing>.");
77 cudaMemcpyAsync(
hostData_.get(),
devicePtr_.get() + 10,
sizeof(float), cudaMemcpyDeviceToHost, ctx.stream()));
84 <<
label_ <<
" TestCUDAProducerGPUEW::produce begin event " << iEvent.
id().
event() <<
" stream "
Log< level::Info, true > LogVerbatim
EventNumber_t event() const
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
const float * get() const
void acquire(edm::Event const &iEvent, edm::EventSetup const &iSetup, edm::WaitingTaskWithArenaHolder waitingTaskHolder) override
TestCUDAProducerGPUEW(edm::ParameterSet const &iConfig)
#define DEFINE_FWK_MODULE(type)
unique_ptr< ClusterSequence > cs
std::unique_ptr< T, impl::HostDeleter > unique_ptr
cms::cuda::device::unique_ptr< float[]> devicePtr_
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
static std::string const input
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
cms::cuda::device::unique_ptr< float[]> runAlgo(const std::string &label, cudaStream_t stream) const
~TestCUDAProducerGPUEW() override=default
bool get(ProductID const &oid, Handle< PROD > &result) const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void setComment(std::string const &value)
edm::EDPutTokenT< cms::cuda::Product< cms::cudatest::Thing > > const dstToken_
T getParameter(std::string const &) const
cms::cuda::host::noncached::unique_ptr< float > hostData_
TestCUDAProducerGPUKernel gpuAlgo_
StreamID streamID() const
#define cudaCheck(ARG,...)
void produce(edm::Event &iEvent, edm::EventSetup const &iSetup) override
edm::EDGetTokenT< cms::cuda::Product< cms::cudatest::Thing > > const srcToken_
cms::cuda::ContextState ctxState_