ATLAS Offline Software
Loading...
Searching...
No Matches
EFTrackingFPGAIntegration::F110IntegrationAlg Class Reference

This is the class for the benchmark algorithm specific to the FPGA integration and output conversion. More...

#include <F110IntegrationAlg.h>

Inheritance diagram for EFTrackingFPGAIntegration::F110IntegrationAlg:

Public Member Functions

virtual StatusCode initialize () override final
 Detect the OpenCL devices and prepare OpenCL context.
virtual StatusCode execute (const EventContext &ctx) const override final
 Should be overriden by derived classes to perform meaningful work.
virtual StatusCode finalize () override final
StatusCode loadProgram (const std::string &xclbin)
 Find the xclbin file and load it into the OpenCL program object.
StatusCode precheck (const std::vector< Gaudi::Property< std::string > > &inputs) const
 Check if the the desired Gaudi properties are set.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

cl::Device m_accelerator
 Device object for the accelerator card.
cl::Context m_context
 Context object for the application.
cl::Program m_program
 Program object containing the kernel.
Gaudi::Property< std::string > m_deviceBDF {this, "bdfID", "", "BDF ID of the accelerator card"}
 BDF ID of the accelerator card.
Gaudi::Property< bool > m_doEmulation {this, "doEmulation", false, "If software or hardware emulation is being used for debugging"}

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

std::vector< cl::Event > getDepVector (std::vector< cl::Event > &endEvents, size_t cu) const
void getListofCUs (std::vector< std::string > &cuNames)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ServiceHandle< IChronoSvc > m_chronoSvc {"ChronoStatSvc", name()}
 Service for timing the algorithm.
SG::ReadHandleKey< std::vector< uint64_t > > m_FPGAPixelRDO {this, "FPGAEncodedPixelKey", "FPGAEncodedPixelRDOs", "Pixel RDO converted to FPGA format"}
SG::ReadHandleKey< std::vector< uint64_t > > m_FPGAStripRDO {this, "FPGAEncodedStripKey", "FPGAEncodedStripRDOs", "Strip RDO converted to FPGA format"}
SG::ReadHandleKey< int > m_FPGAPixelRDOSize {this, "FPGAEncodedPixelSizeKey", "FPGAEncodedPixelSizeRDOs", "Pixel RDO converted to FPGA format"}
SG::ReadHandleKey< int > m_FPGAStripRDOSize {this, "FPGAEncodedStripSizeKey", "FPGAEncodedStripSizeRDOs", "Strip RDO converted to FPGA format"}
SG::WriteHandleKey< std::vector< uint32_t > > m_FPGAPixelOutput {this, "FPGAOutputPixelKey", "FPGAPixelOutput", "Pixel output from FPGA format"}
SG::WriteHandleKey< std::vector< uint32_t > > m_FPGAStripOutput {this, "FPGAOutputStripKey", "FPGAStripOutput", "Strip output from FPGA format"}
Gaudi::Property< int > m_FPGAThreads {this, "FPGAThreads", 1, "number of FPGA threads to initialize"}
Gaudi::Property< std::string > m_xclbin {this, "xclbin", "", "xclbin path and name"}
 Path and name of the xclbin file.
Gaudi::Property< std::string > m_pixelEdmKernelName {this, "PixelEDMPrepKernelName", "", "Name of the FPGA kernel"}
 Name of the FPGA kernel.
Gaudi::Property< std::string > m_stripEdmKernelName {this, "StripEDMPrepKernelName", "", "Name of the FPGA kernel"}
 Name of the FPGA kernel.
Gaudi::Property< std::string > m_pixelClusterKernelName {this, "PixelClusterKernelName", "", "Name of the pixel clustering kernel"}
 Name of the pixel clustering kernel.
Gaudi::Property< std::string > m_stripClusterKernelName {this, "StripClusterKernelName", "", "Name of the strip clustering kernel"}
 Name of the strip clustering kernel.
Gaudi::Property< std::string > m_stripL2GKernelName {this, "StripL2GKernelName", "", "Name of the strip L2G kernel"}
 Name of the strip L2G kernelS.
std::mutex m_fpgaHandleMtx
std::vector< cl::Event > m_stripClusterEndEvents ATLAS_THREAD_SAFE
std::vector< cl::Event > m_stripL2GEndEvents ATLAS_THREAD_SAFE
std::vector< cl::Event > m_stripEDMEndEvents ATLAS_THREAD_SAFE
std::vector< cl::Event > m_pixelClusterEndEvents ATLAS_THREAD_SAFE
std::vector< cl::Event > m_pixelEDMEndEvents ATLAS_THREAD_SAFE
std::vector< cl::Kernel > m_pixelClusterKernels ATLAS_THREAD_SAFE
std::vector< cl::Kernel > m_pixelEDMKernels ATLAS_THREAD_SAFE
std::vector< cl::Kernel > m_stripClusterKernels ATLAS_THREAD_SAFE
std::vector< cl::Kernel > m_stripEDMKernels ATLAS_THREAD_SAFE
std::vector< cl::Kernel > m_stripL2GKernels ATLAS_THREAD_SAFE
std::atomic< ulonglong > m_numEvents {0}
 Number of events processed.
std::atomic< cl_ulong > m_pixelInputTime {0}
 Time for pixel input buffer write.
std::atomic< cl_ulong > m_stripInputTime {0}
 Time for strip input buffer write.
std::atomic< cl_ulong > m_pixelClusteringTime {0}
 Time for pixel clustering.
std::atomic< cl_ulong > m_stripClusteringTime {0}
 Time for strip clustering.
std::atomic< cl_ulong > m_stripL2GTime {0}
 Time for strip L2G.
std::atomic< cl_ulong > m_pixelEdmPrepTime {0}
 Time for pixel EDM preparation.
std::atomic< cl_ulong > m_stripEdmPrepTime {0}
 Time for strip EDM preparation.
std::atomic< cl_ulong > m_pixelOutputTime {0}
 Time for pixel output buffer read.
std::atomic< cl_ulong > m_stripOutputTime {0}
 Time for strip output buffer read.
std::atomic< cl_ulong > m_kernelTime {0}
 Time for kernel execution.
std::vector< cl::Buffer > m_pixelClusterInputBufferList ATLAS_THREAD_SAFE
std::vector< cl::Buffer > m_stripClusterInputBufferList ATLAS_THREAD_SAFE
std::vector< cl::Buffer > m_stripClusterOutputBufferList ATLAS_THREAD_SAFE
std::vector< cl::Buffer > m_pixelClusterEDMOutputBufferList ATLAS_THREAD_SAFE
std::vector< cl::Buffer > m_stripClusterEDMOutputBufferList ATLAS_THREAD_SAFE
std::vector< cl::Buffer > m_stripL2GOutputBufferList ATLAS_THREAD_SAFE
std::vector< cl::Buffer > m_stripL2GEDMOutputBufferList ATLAS_THREAD_SAFE
std::vector< cl::Buffer > m_edmPixelOutputBufferList ATLAS_THREAD_SAFE
std::vector< cl::Buffer > m_edmStripOutputBufferList ATLAS_THREAD_SAFE
cl::CommandQueue m_acc_queue
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

This is the class for the benchmark algorithm specific to the FPGA integration and output conversion.

This algorithm is used to benchmark and optimize the FPGA output memory migration and output conversion. It expects the use of FPGA pass-through kernel.

Definition at line 37 of file F110IntegrationAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode EFTrackingFPGAIntegration::F110IntegrationAlg::execute ( const EventContext & ctx) const
finaloverridevirtual

Should be overriden by derived classes to perform meaningful work.

Input handles

Reimplemented from IntegrationBase.

Definition at line 138 of file F110IntegrationAlg.cxx.

139 {
140 ATH_MSG_DEBUG("Executing F110IntegrationAlg");
141 m_numEvents++;
142
144 auto pixelInput = SG::get(m_FPGAPixelRDO, ctx);
145 auto stripInput = SG::get(m_FPGAStripRDO, ctx);
146
147 const int* pixelInputSize{nullptr}, *stripInputSize{nullptr};
148 ATH_CHECK(SG::get(pixelInputSize, m_FPGAPixelRDOSize, ctx));
149 ATH_CHECK(SG::get(stripInputSize, m_FPGAStripRDOSize, ctx));
150
151 // logic
152 unsigned int nthreads = m_FPGAThreads.value();
153
154 if(m_FPGAThreads.value() < 1){
155 nthreads = SG::getNSlots();
156 }
157
158 size_t bufferIndex = ctx.slot() % nthreads;
159
160 // Get index for each of the kernels
161 size_t pixelClusterIndex = ctx.slot() % m_pixelClusterKernels.size();
162 size_t stripClusterIndex = ctx.slot() % m_stripClusterKernels.size();
163 size_t stripL2GIndex = ctx.slot() % m_stripL2GKernels.size();
164 size_t pixelEDMIndex = ctx.slot() % m_pixelEDMKernels.size();
165 size_t stripEDMIndex = ctx.slot() % m_stripEDMKernels.size();
166
167
168 // Explicit mutex needed so we don't block multithreading from functioning properly but end the execute function in accordance with FPGA hardware resource utilization
169 std::unique_lock lock(m_fpgaHandleMtx);
170
171
172 //ATH_MSG_DEBUG("F100 Thread number "<<ctx.slot()<<" running on buffer "<<bufferIndex<<" pixelClusterIndex: "<< pixelClusterIndex<<" stripClusterIndex: "<< stripClusterIndex<<" stripL2GIndex: "<< stripL2GIndex<<" pixelEDMIndex: "<< pixelEDMIndex<<" stripEDMIndex: "<< stripEDMIndex);
173
174
175 // Grab buffers
176 cl::Buffer pixelClusterInputBuffer = m_pixelClusterInputBufferList[bufferIndex];
177 cl::Buffer stripClusterInputBuffer = m_stripClusterInputBufferList[bufferIndex];
178 cl::Buffer stripClusterOutputBuffer = m_stripClusterOutputBufferList[bufferIndex];
179 cl::Buffer pixelClusterEDMOutputBuffer = m_pixelClusterEDMOutputBufferList[bufferIndex];
180 cl::Buffer stripClusterEDMOutputBuffer = m_stripClusterEDMOutputBufferList[bufferIndex];
181 cl::Buffer stripL2GOutputBuffer = m_stripL2GOutputBufferList[bufferIndex];
182 cl::Buffer stripL2GEDMOutputBuffer = m_stripL2GEDMOutputBufferList[bufferIndex];
183 cl::Buffer edmPixelOutputBuffer = m_edmPixelOutputBufferList[bufferIndex];
184 cl::Buffer edmStripOutputBuffer = m_edmStripOutputBufferList[bufferIndex];
185
186
187 // Grab kernels
188 cl::Kernel &pixelClusteringKernel = m_pixelClusterKernels[pixelClusterIndex];
189 cl::Kernel &pixelEdmPrepKernel = m_pixelEDMKernels[pixelEDMIndex];
190
191 cl::Kernel &stripClusteringKernel = m_stripClusterKernels[stripClusterIndex];
192 cl::Kernel &stripL2GKernel = m_stripL2GKernels[stripL2GIndex];
193 cl::Kernel &stripEdmPrepKernel = m_stripEDMKernels[stripEDMIndex];
194
195
196 // Set kernel args
197 pixelClusteringKernel.setArg<cl::Buffer>(0, pixelClusterInputBuffer);
198 pixelClusteringKernel.setArg<cl::Buffer>(1, pixelClusterEDMOutputBuffer);
199
200 stripClusteringKernel.setArg<cl::Buffer>(0, stripClusterInputBuffer);
201 stripClusteringKernel.setArg<cl::Buffer>(1, stripClusterOutputBuffer);
202 stripClusteringKernel.setArg<cl::Buffer>(2, stripClusterEDMOutputBuffer);
203 stripClusteringKernel.setArg<unsigned int>(3, *stripInputSize);
204
205 stripL2GKernel.setArg<cl::Buffer>(0, stripClusterOutputBuffer);
206 stripL2GKernel.setArg<cl::Buffer>(1, stripClusterEDMOutputBuffer);
207 stripL2GKernel.setArg<cl::Buffer>(2, stripL2GOutputBuffer);
208 stripL2GKernel.setArg<cl::Buffer>(3, stripL2GEDMOutputBuffer);
209
210 pixelEdmPrepKernel.setArg<cl::Buffer>(0, pixelClusterEDMOutputBuffer);
211 pixelEdmPrepKernel.setArg<cl::Buffer>(1, edmPixelOutputBuffer);
212 stripEdmPrepKernel.setArg<cl::Buffer>(0, stripL2GEDMOutputBuffer);
213 stripEdmPrepKernel.setArg<cl::Buffer>(1, edmStripOutputBuffer);
214
215
216 // Start memory transfers while respecting event deps
217 // Note that no explicit mutex is needed anymore due to the m_fpgaHandleMtx mutex
218 std::vector<cl::Event> writePixelInputDeps = getDepVector(m_pixelClusterEndEvents, pixelClusterIndex);
219 std::vector<cl::Event> writeStripInputDeps = getDepVector(m_stripClusterEndEvents, stripClusterIndex);
220
221 cl::Event writePixelInputEvt;
222 cl::Event writeStripInputEvt;
223 m_acc_queue.enqueueWriteBuffer(pixelClusterInputBuffer, CL_FALSE, 0, sizeof(uint64_t) * (*pixelInput).size(), (*pixelInput).data(), &writePixelInputDeps, &writePixelInputEvt);
224 m_acc_queue.enqueueWriteBuffer(stripClusterInputBuffer, CL_FALSE, 0, sizeof(uint64_t) * (*stripInput).size(), (*stripInput).data(), &writeStripInputDeps, &writeStripInputEvt);
225
226 std::vector<cl::Event> pixelClusteringDeps = { writePixelInputEvt };
227 std::vector<cl::Event> stripClusteringDeps = { writeStripInputEvt };
228
229 cl::Event pixelClusteringEvt;
230 cl::Event stripClusteringEvt;
231 cl::Event pixelL2GEvt;
232 cl::Event stripL2GEvt;
233 cl::Event edmPrepEvt;
234 cl::Event pixelEdmPrepEvt;
235 cl::Event stripEdmPrepEvt;
236
237 {
238 Athena::Chrono chrono("Kernel execution", m_chronoSvc.get());
239
240 // CLUSTERING
241 m_acc_queue.enqueueTask(pixelClusteringKernel, &pixelClusteringDeps, &pixelClusteringEvt);
242 m_acc_queue.enqueueTask(stripClusteringKernel, &stripClusteringDeps, &stripClusteringEvt);
243
244 // Track the clustering end events
245 m_pixelClusterEndEvents[pixelClusterIndex] = pixelClusteringEvt;
246 m_stripClusterEndEvents[stripClusterIndex] = stripClusteringEvt;
247
248 std::vector<cl::Event> stripL2GDeps = getDepVector(m_stripL2GEndEvents, stripClusterIndex);
249 stripL2GDeps.push_back(stripClusteringEvt);
250
251 m_acc_queue.enqueueTask(stripL2GKernel, &stripL2GDeps, &stripL2GEvt);
252
253 m_stripL2GEndEvents[stripClusterIndex] = stripL2GEvt;
254
255 // EDM PREP
256 std::vector<cl::Event> pixelEdmPrepDeps = getDepVector(m_pixelEDMEndEvents, pixelClusterIndex);
257 pixelEdmPrepDeps.push_back(pixelClusteringEvt);
258
259 // Run discrete EDM prep kernels for F110
260 std::vector<cl::Event> stripEdmPrepDeps = getDepVector(m_stripEDMEndEvents, stripClusterIndex);
261 stripEdmPrepDeps.push_back(stripL2GEvt);
262
263 m_acc_queue.enqueueTask(stripEdmPrepKernel, &stripEdmPrepDeps, &stripEdmPrepEvt);
264 m_acc_queue.enqueueTask(pixelEdmPrepKernel, &pixelEdmPrepDeps, &pixelEdmPrepEvt);
265
266 }
267
268 // READ OUTPUTS
269 cl::Event readPixelOutputEvt;
270 cl::Event readStripOutputEvt;
271 std::vector<cl::Event> readPixelOutputDeps;
272 std::vector<cl::Event> readStripOutputDeps;
273
274 readPixelOutputDeps.push_back(pixelEdmPrepEvt);
275 readStripOutputDeps.push_back(stripEdmPrepEvt);
276
277
278 SG::WriteHandle<std::vector<uint32_t>> FPGAPixelOutput(m_FPGAPixelOutput, ctx);
279 ATH_CHECK(FPGAPixelOutput.record(std::make_unique<std::vector<uint32_t> >(EFTrackingTransient::PIXEL_CONTAINER_BUF_SIZE, 0)));
280
281 SG::WriteHandle<std::vector<uint32_t>> FPGAStripOutput(m_FPGAStripOutput, ctx);
282 ATH_CHECK(FPGAStripOutput.record(std::make_unique<std::vector<uint32_t> >(EFTrackingTransient::STRIP_CONTAINER_BUF_SIZE, 0)));
283
284 m_acc_queue.enqueueReadBuffer(edmPixelOutputBuffer, CL_FALSE, 0, sizeof(uint32_t) * (*FPGAPixelOutput).size(), (*FPGAPixelOutput).data(), &readPixelOutputDeps, &readPixelOutputEvt);
285 m_acc_queue.enqueueReadBuffer(edmStripOutputBuffer, CL_FALSE, 0, sizeof(uint32_t) * (*FPGAStripOutput).size(), (*FPGAStripOutput).data(), &readStripOutputDeps, &readStripOutputEvt);
286
287
288 // Unlocks mutex so other events can handle their FPGA interactions while this event is waiting
289 lock.unlock();
290
291
292 // Wait for the reading to finish before terminating the event
293 std::vector<cl::Event> terminationDeps = { readPixelOutputEvt, readStripOutputEvt };
294 cl::Event::waitForEvents(terminationDeps);
295
296 if(*pixelInputSize == 6) (*FPGAPixelOutput)[0] = 0; // if no pixel input, set the first element to 0
297 if(*stripInputSize == 6) (*FPGAStripOutput)[0] = 0; // if no strip input, set the first element to 0
298
299
300 // calculate the time for the kernel execution
301 // get the time of writing pixel input buffer
302 cl_ulong pixel_input_time = writePixelInputEvt.getProfilingInfo<CL_PROFILING_COMMAND_END>() - writePixelInputEvt.getProfilingInfo<CL_PROFILING_COMMAND_START>();
303 m_pixelInputTime += pixel_input_time;
304 ATH_MSG_DEBUG("Pixel input buffer write time: " << pixel_input_time / 1e6 << " ms");
305
306 // get the time of writing strip input buffer
307 cl_ulong strip_input_time = writeStripInputEvt.getProfilingInfo<CL_PROFILING_COMMAND_END>() - writeStripInputEvt.getProfilingInfo<CL_PROFILING_COMMAND_START>();
308 m_stripInputTime += strip_input_time;
309 ATH_MSG_DEBUG("Strip input buffer write time: " << strip_input_time / 1e6 << " ms");
310
311 // get the time of pixel clustering
312 cl_ulong pixel_clustering_time = pixelClusteringEvt.getProfilingInfo<CL_PROFILING_COMMAND_END>() - pixelClusteringEvt.getProfilingInfo<CL_PROFILING_COMMAND_START>();
313 m_pixelClusteringTime += pixel_clustering_time;
314 ATH_MSG_DEBUG("Pixel clustering time: " << pixel_clustering_time / 1e6 << " ms");
315
316 // get the time of strip clustering
317 cl_ulong strip_clustering_time = stripClusteringEvt.getProfilingInfo<CL_PROFILING_COMMAND_END>() - stripClusteringEvt.getProfilingInfo<CL_PROFILING_COMMAND_START>();
318 m_stripClusteringTime += strip_clustering_time;
319 ATH_MSG_DEBUG("Strip clustering time: " << strip_clustering_time / 1e6 << " ms");
320
321
322 // get the time of strip L2G
323 cl_ulong strip_l2g_time = stripL2GEvt.getProfilingInfo<CL_PROFILING_COMMAND_END>() - stripL2GEvt.getProfilingInfo<CL_PROFILING_COMMAND_START>();
324 m_stripL2GTime += strip_l2g_time;
325 ATH_MSG_DEBUG("Strip L2G time: " << strip_l2g_time / 1e6 << " ms");
326
327 // get the time of EDMPrep
328
329 cl_ulong pixel_edm_prep_time = pixelEdmPrepEvt.getProfilingInfo<CL_PROFILING_COMMAND_END>() - pixelEdmPrepEvt.getProfilingInfo<CL_PROFILING_COMMAND_START>();
330 cl_ulong strip_edm_prep_time = stripEdmPrepEvt.getProfilingInfo<CL_PROFILING_COMMAND_END>() - stripEdmPrepEvt.getProfilingInfo<CL_PROFILING_COMMAND_START>();
331
332 m_pixelEdmPrepTime += pixel_edm_prep_time;
333 ATH_MSG_DEBUG("PixelEDMPrep time: " << pixel_edm_prep_time / 1e6 << " ms");
334
335 m_stripEdmPrepTime += strip_edm_prep_time;
336 ATH_MSG_DEBUG("StripEDMPrep time: " << strip_edm_prep_time / 1e6 << " ms");
337
338 // get the time of the whole kernel execution
339 cl_ulong kernel_start = pixelClusteringEvt.getProfilingInfo<CL_PROFILING_COMMAND_QUEUED>();
340 cl_ulong kernel_end = std::max(pixelEdmPrepEvt.getProfilingInfo<CL_PROFILING_COMMAND_END>(), stripEdmPrepEvt.getProfilingInfo<CL_PROFILING_COMMAND_END>());
341 m_kernelTime += (kernel_end - kernel_start);
342 ATH_MSG_DEBUG("Kernel execution time: " << (kernel_end - kernel_start) / 1e6 << " ms");
343
344 // get the time of reading pixel output buffer
345 cl_ulong pixel_output_time = readPixelOutputEvt.getProfilingInfo<CL_PROFILING_COMMAND_END>() - readPixelOutputEvt.getProfilingInfo<CL_PROFILING_COMMAND_START>();
346 m_pixelOutputTime += pixel_output_time;
347 ATH_MSG_DEBUG("Pixel output buffer read time: " << pixel_output_time / 1e6 << " ms");
348
349 // get the time of reading strip output buffer
350 cl_ulong strip_output_time = readStripOutputEvt.getProfilingInfo<CL_PROFILING_COMMAND_END>() - readStripOutputEvt.getProfilingInfo<CL_PROFILING_COMMAND_START>();
351 m_stripOutputTime += strip_output_time;
352 ATH_MSG_DEBUG("Strip output buffer read time: " << strip_output_time / 1e6 << " ms");
353
354
355 return StatusCode::SUCCESS;
356 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
std::vector< cl::Event > getDepVector(std::vector< cl::Event > &endEvents, size_t cu) const
SG::ReadHandleKey< std::vector< uint64_t > > m_FPGAPixelRDO
SG::WriteHandleKey< std::vector< uint32_t > > m_FPGAPixelOutput
std::atomic< cl_ulong > m_pixelInputTime
Time for pixel input buffer write.
std::atomic< cl_ulong > m_stripOutputTime
Time for strip output buffer read.
ServiceHandle< IChronoSvc > m_chronoSvc
Service for timing the algorithm.
std::atomic< cl_ulong > m_pixelClusteringTime
Time for pixel clustering.
std::atomic< cl_ulong > m_kernelTime
Time for kernel execution.
std::atomic< cl_ulong > m_stripInputTime
Time for strip input buffer write.
std::atomic< cl_ulong > m_pixelOutputTime
Time for pixel output buffer read.
SG::WriteHandleKey< std::vector< uint32_t > > m_FPGAStripOutput
std::atomic< cl_ulong > m_stripClusteringTime
Time for strip clustering.
std::atomic< ulonglong > m_numEvents
Number of events processed.
std::atomic< cl_ulong > m_pixelEdmPrepTime
Time for pixel EDM preparation.
std::atomic< cl_ulong > m_stripL2GTime
Time for strip L2G.
std::atomic< cl_ulong > m_stripEdmPrepTime
Time for strip EDM preparation.
SG::ReadHandleKey< std::vector< uint64_t > > m_FPGAStripRDO
constexpr uint32_t STRIP_CONTAINER_BUF_SIZE
constexpr uint32_t PIXEL_CONTAINER_BUF_SIZE
size_t getNSlots()
Return the number of event slots.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ finalize()

StatusCode EFTrackingFPGAIntegration::F110IntegrationAlg::finalize ( )
finaloverridevirtual

Definition at line 358 of file F110IntegrationAlg.cxx.

359 {
360
361 ATH_MSG_INFO("Finalizing F110IntegrationAlg");
362 ATH_MSG_INFO("Number of events: " << m_numEvents);
363
364 if(m_numEvents > 0){
365 ATH_MSG_INFO("Pixel input ave time: " << m_pixelInputTime / m_numEvents / 1e6 << " ms");
366 ATH_MSG_INFO("Strip input ave time: " << m_stripInputTime / m_numEvents / 1e6 << " ms");
367 ATH_MSG_INFO("Pixel clustering ave time: " << m_pixelClusteringTime / m_numEvents / 1e6 << " ms");
368 ATH_MSG_INFO("Strip clustering ave time: " << m_stripClusteringTime / m_numEvents / 1e6 << " ms");
369 ATH_MSG_INFO("Strip L2G ave time: " << m_stripL2GTime / m_numEvents / 1e6 << " ms");
370 ATH_MSG_INFO("PixelEDMPrep ave time: " << m_pixelEdmPrepTime / m_numEvents / 1e6 << " ms");
371 ATH_MSG_INFO("StripEDMPrep ave time: " << m_stripEdmPrepTime / m_numEvents / 1e6 << " ms");
372 ATH_MSG_INFO("Kernel execution ave time: " << m_kernelTime / m_numEvents / 1e6 << " ms");
373 ATH_MSG_INFO("Pixel output ave time: " << m_pixelOutputTime / m_numEvents / 1e6 << " ms");
374 ATH_MSG_INFO("Strip output ave time: " << m_stripOutputTime / m_numEvents / 1e6 << " ms");
375 }
376
377 return StatusCode::SUCCESS;
378 }
#define ATH_MSG_INFO(x)

◆ getDepVector()

std::vector< cl::Event > EFTrackingFPGAIntegration::F110IntegrationAlg::getDepVector ( std::vector< cl::Event > & endEvents,
size_t cu ) const
private

Definition at line 123 of file F110IntegrationAlg.cxx.

123 {
124 std::vector<cl::Event> deps;
125
126 cl::Event event = endEvents[cu];
127
128 if (event() != NULL)
129 {
130 // Event exists
131 deps.push_back(event);
132 }
133
134 return deps;
135 }

◆ getListofCUs()

void EFTrackingFPGAIntegration::F110IntegrationAlg::getListofCUs ( std::vector< std::string > & cuNames)
private

Definition at line 380 of file F110IntegrationAlg.cxx.

381 {
382 xrt::xclbin xrt_xclbin(m_xclbin.value());
383
384 ATH_MSG_INFO("xsa name: "<<xrt_xclbin.get_xsa_name());
385 ATH_MSG_INFO("fpga name: "<<xrt_xclbin.get_fpga_device_name());
386 ATH_MSG_INFO("uuid: "<<xrt_xclbin.get_uuid().to_string());
387
388 for (const xrt::xclbin::kernel &kernel : xrt_xclbin.get_kernels()) {
389 const std::string& kernelName = kernel.get_name();
390
391 ATH_MSG_INFO("kernelName: "<<kernelName);
392
393
394 for (const xrt::xclbin::ip &computeUnit : kernel.get_cus()) {
395 const std::string& computeUnitName = computeUnit.get_name();
396 const std::string computeUnitIsolatedName = computeUnitName.substr(kernelName.size() + 1);
397
398 const std::string computeUnitUsableName = kernelName + ":{" + computeUnitIsolatedName + "}";
399
400 ATH_MSG_INFO("CU name: "<<computeUnitUsableName);
401 cuNames.push_back(computeUnitUsableName);
402 }
403 }
404
405 }
Gaudi::Property< std::string > m_xclbin
Path and name of the xclbin file.

◆ initialize()

StatusCode EFTrackingFPGAIntegration::F110IntegrationAlg::initialize ( )
finaloverridevirtual

Detect the OpenCL devices and prepare OpenCL context.

This should always be called by derived classes when running on the FPGA accelerator.

Reimplemented from IntegrationBase.

Definition at line 15 of file F110IntegrationAlg.cxx.

16 {
17 ATH_MSG_INFO("Running on the FPGA accelerator");
18
20
21 ATH_CHECK(m_chronoSvc.retrieve());
22
23 {
24 Athena::Chrono chrono("Platform and device initlize", m_chronoSvc.get());
26 }
27
28 {
29 Athena::Chrono chrono("CL::loadProgram", m_chronoSvc.get());
31 }
32 ATH_MSG_INFO("loading "<<m_xclbin);
33
34
35 ATH_CHECK(m_FPGAStripRDO.initialize());
36 ATH_CHECK(m_FPGAPixelRDO.initialize());
37
38 ATH_CHECK(m_FPGAPixelRDOSize.initialize());
39 ATH_CHECK(m_FPGAStripRDOSize.initialize());
40
41 ATH_CHECK(m_FPGAStripOutput.initialize());
42 ATH_CHECK(m_FPGAPixelOutput.initialize());
43
44 cl_int err = 0;
45
46 // Get the list of CUs
47 std::vector<std::string> listofCUs;
48 getListofCUs(listofCUs);
49
50 // Create kernels for each one of CUs that is inside device
51 for (const auto& cuName: listofCUs)
52 {
53 // Pixel clustering
54 if(cuName.find(m_pixelClusterKernelName.value()) != std::string::npos) m_pixelClusterKernels.emplace_back(cl::Kernel(m_program, cuName.c_str()));
55
56 // Strip clustering
57 else if(cuName.find(m_stripClusterKernelName.value()) != std::string::npos) m_stripClusterKernels.emplace_back(cl::Kernel(m_program, cuName.c_str()));
58
59 // Strip L2G
60 else if(cuName.find(m_stripL2GKernelName.value()) != std::string::npos) m_stripL2GKernels.emplace_back(cl::Kernel(m_program, cuName.c_str()));
61
62 // EDM prep
63 else if(cuName.find(m_pixelEdmKernelName.value()) != std::string::npos) m_pixelEDMKernels.emplace_back(cl::Kernel(m_program, cuName.c_str()));
64
65 else if(cuName.find(m_stripEdmKernelName.value()) != std::string::npos) m_stripEDMKernels.emplace_back(cl::Kernel(m_program, cuName.c_str()));
66
67 else
68 {
69 ATH_MSG_WARNING("Do not recognize kernel name: "<<cuName);
70 }
71
72 }
73
74 ATH_MSG_INFO(m_pixelClusterKernelName.value()<<" size: "<<m_pixelClusterKernels.size());
75 ATH_MSG_INFO(m_stripClusterKernelName.value()<<" size: "<<m_stripClusterKernels.size());
76 ATH_MSG_INFO(m_stripL2GKernelName.value()<<" size: "<<m_stripL2GKernels.size());
77 ATH_MSG_INFO(m_pixelEdmKernelName.value()<<" size: "<<m_pixelEDMKernels.size());
78 ATH_MSG_INFO(m_stripEdmKernelName.value()<<" size: "<<m_stripEDMKernels.size());
79
80
81 // Strip
82 // Set vector size to be = to # of CUs
83 m_stripClusterEndEvents.resize(m_stripClusterKernels.size());
84 m_stripL2GEndEvents.resize(m_stripL2GKernels.size());
85 m_stripEDMEndEvents.resize(m_stripEDMKernels.size());
86
87 // Pixel
88 m_pixelClusterEndEvents.resize(m_pixelClusterKernels.size());
89 m_pixelEDMEndEvents.resize(m_pixelEDMKernels.size());
90
91 unsigned int nthreads = m_FPGAThreads.value();
92
93 if(m_FPGAThreads.value() < 1){
94 nthreads = SG::getNSlots();
95 }
96
97 // create the buffers
98 for(unsigned int i = 0; i < nthreads; i++)
99 {
100 // Input
101 m_pixelClusterInputBufferList.push_back(cl::Buffer(m_context, CL_MEM_READ_ONLY, EFTrackingTransient::PIXEL_CONTAINER_INPUT_BUF_SIZE * sizeof(uint64_t), NULL, &err));
102 m_stripClusterInputBufferList.push_back(cl::Buffer(m_context, CL_MEM_READ_ONLY, EFTrackingTransient::STRIP_CONTAINER_INPUT_BUF_SIZE * sizeof(uint64_t), NULL, &err));
103
104 m_stripClusterOutputBufferList.push_back(cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), NULL, &err));
105 m_pixelClusterEDMOutputBufferList.push_back(cl::Buffer(m_context, CL_MEM_READ_WRITE,EFTrackingTransient::PIXEL_BLOCK_BUF_SIZE * sizeof(uint64_t), NULL, &err));
106 m_stripClusterEDMOutputBufferList.push_back(cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), NULL, &err));
107
108 m_stripL2GOutputBufferList.push_back(cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), NULL, &err));
109 m_stripL2GEDMOutputBufferList.push_back(cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), NULL, &err));
110 // EDMPrep
111 m_edmPixelOutputBufferList.push_back(cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::PIXEL_CONTAINER_BUF_SIZE * sizeof(uint32_t), NULL, &err));
112 m_edmStripOutputBufferList.push_back(cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_CONTAINER_BUF_SIZE * sizeof(uint32_t), NULL, &err));
113 }
114
115
116
117 m_acc_queue = cl::CommandQueue(m_context, m_accelerator, CL_QUEUE_PROFILING_ENABLE | CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, &err);
118
119 if (err != 0) return StatusCode::FAILURE;
120 return StatusCode::SUCCESS;
121 }
#define ATH_MSG_WARNING(x)
Gaudi::Property< std::string > m_stripL2GKernelName
Name of the strip L2G kernelS.
Gaudi::Property< std::string > m_pixelEdmKernelName
Name of the FPGA kernel.
Gaudi::Property< std::string > m_stripEdmKernelName
Name of the FPGA kernel.
Gaudi::Property< std::string > m_pixelClusterKernelName
Name of the pixel clustering kernel.
Gaudi::Property< std::string > m_stripClusterKernelName
Name of the strip clustering kernel.
void getListofCUs(std::vector< std::string > &cuNames)
StatusCode loadProgram(const std::string &xclbin)
Find the xclbin file and load it into the OpenCL program object.
cl::Program m_program
Program object containing the kernel.
virtual StatusCode initialize() override
Detect the OpenCL devices and prepare OpenCL context.
cl::Context m_context
Context object for the application.
StatusCode precheck(const std::vector< Gaudi::Property< std::string > > &inputs) const
Check if the the desired Gaudi properties are set.
cl::Device m_accelerator
Device object for the accelerator card.
constexpr unsigned long PIXEL_CONTAINER_INPUT_BUF_SIZE
constexpr unsigned long STRIP_CONTAINER_INPUT_BUF_SIZE
constexpr uint32_t STRIP_BLOCK_BUF_SIZE
constexpr uint32_t PIXEL_BLOCK_BUF_SIZE

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ loadProgram()

StatusCode IntegrationBase::loadProgram ( const std::string & xclbin)
inherited

Find the xclbin file and load it into the OpenCL program object.

Definition at line 115 of file IntegrationBase.cxx.

116{
117 // Open binary object in binary mode
118 std::ifstream bin_file(xclbin, std::ios_base::binary);
119 if (!bin_file)
120 {
121 ATH_MSG_ERROR("Couldn't find the xclbin file: " << xclbin);
122 return StatusCode::FAILURE;
123 }
124 // Get the size of the binary file
125 bin_file.seekg(0, bin_file.end);
126 unsigned bin_size = bin_file.tellg();
127 // Reset the reference point back to the beginning
128 bin_file.seekg(0, bin_file.beg);
129 // Create a new pointer for the binary buffer and get the set a pointer to the binary buffer
130 std::vector<char> buf(bin_size);
131 bin_file.read(buf.data(), bin_size);
132
133 // Create binary object and program object
134 cl_int err = 0;
135 std::vector<cl_int> binaryStatus;
136 cl::Program::Binaries bins{{buf.data(), bin_size}};
137 m_program = cl::Program(m_context, {m_accelerator}, bins, &binaryStatus, &err);
138
139 bin_file.close();
140
141 if (err == CL_SUCCESS && binaryStatus.at(0) == CL_SUCCESS)
142 {
143 ATH_MSG_INFO("Successfully loaded xclbin file into " << m_accelerator.getInfo<CL_DEVICE_NAME>());
144 }
145 else
146 {
147 ATH_MSG_ERROR("Error loading xclbin file (" << xclbin << ") into " << m_accelerator.getInfo<CL_DEVICE_NAME>() <<". Error code: " << err);
148 return StatusCode::FAILURE;
149 }
150
151 return StatusCode::SUCCESS;
152}
#define ATH_MSG_ERROR(x)
static const std::vector< std::string > bins

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ precheck()

StatusCode IntegrationBase::precheck ( const std::vector< Gaudi::Property< std::string > > & inputs) const
inherited

Check if the the desired Gaudi properties are set.

Definition at line 154 of file IntegrationBase.cxx.

155{
156 for(const auto &item : inputs)
157 {
158 if(item.empty())
159 {
160 ATH_MSG_FATAL(item.documentation()<<" is empty. Please set it to a valid value");
161 return StatusCode::FAILURE;
162 }
163 }
164
165 // Always check if bdf is set
166 if (m_deviceBDF.empty())
167 {
168 ATH_MSG_WARNING("Device BDF is not set. Using the first found accelerator card. Set property 'bdfID' to specify the BDF of the device.");
169 }
170
171 return StatusCode::SUCCESS;
172}
#define ATH_MSG_FATAL(x)
Gaudi::Property< std::string > m_deviceBDF
BDF ID of the accelerator card.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/19]

std::vector<cl::Event> m_stripClusterEndEvents EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 75 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [2/19]

std::vector<cl::Event> m_stripL2GEndEvents EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 76 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [3/19]

std::vector<cl::Event> m_stripEDMEndEvents EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 77 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [4/19]

std::vector<cl::Event> m_pixelClusterEndEvents EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 79 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [5/19]

std::vector<cl::Event> m_pixelEDMEndEvents EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 80 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [6/19]

std::vector<cl::Kernel> m_pixelClusterKernels EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 82 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [7/19]

std::vector<cl::Kernel> m_pixelEDMKernels EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 83 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [8/19]

std::vector<cl::Kernel> m_stripClusterKernels EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 85 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [9/19]

std::vector<cl::Kernel> m_stripEDMKernels EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 86 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [10/19]

std::vector<cl::Kernel> m_stripL2GKernels EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 87 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [11/19]

std::vector<cl::Buffer> m_pixelClusterInputBufferList EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 102 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [12/19]

std::vector<cl::Buffer> m_stripClusterInputBufferList EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 103 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [13/19]

std::vector<cl::Buffer> m_stripClusterOutputBufferList EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 105 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [14/19]

std::vector<cl::Buffer> m_pixelClusterEDMOutputBufferList EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 106 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [15/19]

std::vector<cl::Buffer> m_stripClusterEDMOutputBufferList EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 107 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [16/19]

std::vector<cl::Buffer> m_stripL2GOutputBufferList EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 109 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [17/19]

std::vector<cl::Buffer> m_stripL2GEDMOutputBufferList EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 110 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [18/19]

std::vector<cl::Buffer> m_edmPixelOutputBufferList EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 112 of file F110IntegrationAlg.h.

◆ ATLAS_THREAD_SAFE [19/19]

std::vector<cl::Buffer> m_edmStripOutputBufferList EFTrackingFPGAIntegration::F110IntegrationAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 113 of file F110IntegrationAlg.h.

◆ m_acc_queue

cl::CommandQueue EFTrackingFPGAIntegration::F110IntegrationAlg::m_acc_queue
private

Definition at line 116 of file F110IntegrationAlg.h.

◆ m_accelerator

cl::Device IntegrationBase::m_accelerator
protectedinherited

Device object for the accelerator card.

Definition at line 66 of file IntegrationBase.h.

◆ m_chronoSvc

ServiceHandle<IChronoSvc> EFTrackingFPGAIntegration::F110IntegrationAlg::m_chronoSvc {"ChronoStatSvc", name()}
private

Service for timing the algorithm.

Definition at line 48 of file F110IntegrationAlg.h.

48{"ChronoStatSvc", name()};

◆ m_context

cl::Context IntegrationBase::m_context
protectedinherited

Context object for the application.

Definition at line 67 of file IntegrationBase.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_deviceBDF

Gaudi::Property<std::string> IntegrationBase::m_deviceBDF {this, "bdfID", "", "BDF ID of the accelerator card"}
protectedinherited

BDF ID of the accelerator card.

Definition at line 69 of file IntegrationBase.h.

69{this, "bdfID", "", "BDF ID of the accelerator card"};

◆ m_doEmulation

Gaudi::Property<bool> IntegrationBase::m_doEmulation {this, "doEmulation", false, "If software or hardware emulation is being used for debugging"}
protectedinherited

Definition at line 70 of file IntegrationBase.h.

70{this, "doEmulation", false, "If software or hardware emulation is being used for debugging"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_fpgaHandleMtx

std::mutex EFTrackingFPGAIntegration::F110IntegrationAlg::m_fpgaHandleMtx
mutableprivate

Definition at line 73 of file F110IntegrationAlg.h.

◆ m_FPGAPixelOutput

SG::WriteHandleKey<std::vector<uint32_t> > EFTrackingFPGAIntegration::F110IntegrationAlg::m_FPGAPixelOutput {this, "FPGAOutputPixelKey", "FPGAPixelOutput", "Pixel output from FPGA format"}
private

Definition at line 56 of file F110IntegrationAlg.h.

56{this, "FPGAOutputPixelKey", "FPGAPixelOutput", "Pixel output from FPGA format"};

◆ m_FPGAPixelRDO

SG::ReadHandleKey<std::vector<uint64_t> > EFTrackingFPGAIntegration::F110IntegrationAlg::m_FPGAPixelRDO {this, "FPGAEncodedPixelKey", "FPGAEncodedPixelRDOs", "Pixel RDO converted to FPGA format"}
private

Definition at line 50 of file F110IntegrationAlg.h.

50{this, "FPGAEncodedPixelKey", "FPGAEncodedPixelRDOs", "Pixel RDO converted to FPGA format"};

◆ m_FPGAPixelRDOSize

SG::ReadHandleKey<int> EFTrackingFPGAIntegration::F110IntegrationAlg::m_FPGAPixelRDOSize {this, "FPGAEncodedPixelSizeKey", "FPGAEncodedPixelSizeRDOs", "Pixel RDO converted to FPGA format"}
private

Definition at line 53 of file F110IntegrationAlg.h.

53{this, "FPGAEncodedPixelSizeKey", "FPGAEncodedPixelSizeRDOs", "Pixel RDO converted to FPGA format"};

◆ m_FPGAStripOutput

SG::WriteHandleKey<std::vector<uint32_t> > EFTrackingFPGAIntegration::F110IntegrationAlg::m_FPGAStripOutput {this, "FPGAOutputStripKey", "FPGAStripOutput", "Strip output from FPGA format"}
private

Definition at line 57 of file F110IntegrationAlg.h.

57{this, "FPGAOutputStripKey", "FPGAStripOutput", "Strip output from FPGA format"};

◆ m_FPGAStripRDO

SG::ReadHandleKey<std::vector<uint64_t> > EFTrackingFPGAIntegration::F110IntegrationAlg::m_FPGAStripRDO {this, "FPGAEncodedStripKey", "FPGAEncodedStripRDOs", "Strip RDO converted to FPGA format"}
private

Definition at line 51 of file F110IntegrationAlg.h.

51{this, "FPGAEncodedStripKey", "FPGAEncodedStripRDOs", "Strip RDO converted to FPGA format"};

◆ m_FPGAStripRDOSize

SG::ReadHandleKey<int> EFTrackingFPGAIntegration::F110IntegrationAlg::m_FPGAStripRDOSize {this, "FPGAEncodedStripSizeKey", "FPGAEncodedStripSizeRDOs", "Strip RDO converted to FPGA format"}
private

Definition at line 54 of file F110IntegrationAlg.h.

54{this, "FPGAEncodedStripSizeKey", "FPGAEncodedStripSizeRDOs", "Strip RDO converted to FPGA format"};

◆ m_FPGAThreads

Gaudi::Property<int> EFTrackingFPGAIntegration::F110IntegrationAlg::m_FPGAThreads {this, "FPGAThreads", 1, "number of FPGA threads to initialize"}
private

Definition at line 59 of file F110IntegrationAlg.h.

59{this, "FPGAThreads", 1, "number of FPGA threads to initialize"};

◆ m_kernelTime

std::atomic<cl_ulong> EFTrackingFPGAIntegration::F110IntegrationAlg::m_kernelTime {0}
mutableprivate

Time for kernel execution.

Definition at line 99 of file F110IntegrationAlg.h.

99{0};

◆ m_numEvents

std::atomic<ulonglong> EFTrackingFPGAIntegration::F110IntegrationAlg::m_numEvents {0}
mutableprivate

Number of events processed.

Definition at line 89 of file F110IntegrationAlg.h.

89{0};

◆ m_pixelClusteringTime

std::atomic<cl_ulong> EFTrackingFPGAIntegration::F110IntegrationAlg::m_pixelClusteringTime {0}
mutableprivate

Time for pixel clustering.

Definition at line 92 of file F110IntegrationAlg.h.

92{0};

◆ m_pixelClusterKernelName

Gaudi::Property<std::string> EFTrackingFPGAIntegration::F110IntegrationAlg::m_pixelClusterKernelName {this, "PixelClusterKernelName", "", "Name of the pixel clustering kernel"}
private

Name of the pixel clustering kernel.

Definition at line 67 of file F110IntegrationAlg.h.

67{this, "PixelClusterKernelName", "", "Name of the pixel clustering kernel"};

◆ m_pixelEdmKernelName

Gaudi::Property<std::string> EFTrackingFPGAIntegration::F110IntegrationAlg::m_pixelEdmKernelName {this, "PixelEDMPrepKernelName", "", "Name of the FPGA kernel"}
private

Name of the FPGA kernel.

Definition at line 63 of file F110IntegrationAlg.h.

63{this, "PixelEDMPrepKernelName", "", "Name of the FPGA kernel"};

◆ m_pixelEdmPrepTime

std::atomic<cl_ulong> EFTrackingFPGAIntegration::F110IntegrationAlg::m_pixelEdmPrepTime {0}
mutableprivate

Time for pixel EDM preparation.

Definition at line 95 of file F110IntegrationAlg.h.

95{0};

◆ m_pixelInputTime

std::atomic<cl_ulong> EFTrackingFPGAIntegration::F110IntegrationAlg::m_pixelInputTime {0}
mutableprivate

Time for pixel input buffer write.

Definition at line 90 of file F110IntegrationAlg.h.

90{0};

◆ m_pixelOutputTime

std::atomic<cl_ulong> EFTrackingFPGAIntegration::F110IntegrationAlg::m_pixelOutputTime {0}
mutableprivate

Time for pixel output buffer read.

Definition at line 97 of file F110IntegrationAlg.h.

97{0};

◆ m_program

cl::Program IntegrationBase::m_program
protectedinherited

Program object containing the kernel.

Definition at line 68 of file IntegrationBase.h.

◆ m_stripClusteringTime

std::atomic<cl_ulong> EFTrackingFPGAIntegration::F110IntegrationAlg::m_stripClusteringTime {0}
mutableprivate

Time for strip clustering.

Definition at line 93 of file F110IntegrationAlg.h.

93{0};

◆ m_stripClusterKernelName

Gaudi::Property<std::string> EFTrackingFPGAIntegration::F110IntegrationAlg::m_stripClusterKernelName {this, "StripClusterKernelName", "", "Name of the strip clustering kernel"}
private

Name of the strip clustering kernel.

Definition at line 69 of file F110IntegrationAlg.h.

69{this, "StripClusterKernelName", "", "Name of the strip clustering kernel"};

◆ m_stripEdmKernelName

Gaudi::Property<std::string> EFTrackingFPGAIntegration::F110IntegrationAlg::m_stripEdmKernelName {this, "StripEDMPrepKernelName", "", "Name of the FPGA kernel"}
private

Name of the FPGA kernel.

Definition at line 65 of file F110IntegrationAlg.h.

65{this, "StripEDMPrepKernelName", "", "Name of the FPGA kernel"};

◆ m_stripEdmPrepTime

std::atomic<cl_ulong> EFTrackingFPGAIntegration::F110IntegrationAlg::m_stripEdmPrepTime {0}
mutableprivate

Time for strip EDM preparation.

Definition at line 96 of file F110IntegrationAlg.h.

96{0};

◆ m_stripInputTime

std::atomic<cl_ulong> EFTrackingFPGAIntegration::F110IntegrationAlg::m_stripInputTime {0}
mutableprivate

Time for strip input buffer write.

Definition at line 91 of file F110IntegrationAlg.h.

91{0};

◆ m_stripL2GKernelName

Gaudi::Property<std::string> EFTrackingFPGAIntegration::F110IntegrationAlg::m_stripL2GKernelName {this, "StripL2GKernelName", "", "Name of the strip L2G kernel"}
private

Name of the strip L2G kernelS.

Definition at line 71 of file F110IntegrationAlg.h.

71{this, "StripL2GKernelName", "", "Name of the strip L2G kernel"};

◆ m_stripL2GTime

std::atomic<cl_ulong> EFTrackingFPGAIntegration::F110IntegrationAlg::m_stripL2GTime {0}
mutableprivate

Time for strip L2G.

Definition at line 94 of file F110IntegrationAlg.h.

94{0};

◆ m_stripOutputTime

std::atomic<cl_ulong> EFTrackingFPGAIntegration::F110IntegrationAlg::m_stripOutputTime {0}
mutableprivate

Time for strip output buffer read.

Definition at line 98 of file F110IntegrationAlg.h.

98{0};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_xclbin

Gaudi::Property<std::string> EFTrackingFPGAIntegration::F110IntegrationAlg::m_xclbin {this, "xclbin", "", "xclbin path and name"}
private

Path and name of the xclbin file.

Definition at line 61 of file F110IntegrationAlg.h.

61{this, "xclbin", "", "xclbin path and name"};

The documentation for this class was generated from the following files: