Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
EFTrackingFPGAIntegration::BenchmarkAlg Class Reference

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

#include <BenchmarkAlg.h>

Inheritance diagram for EFTrackingFPGAIntegration::BenchmarkAlg:
Collaboration diagram for EFTrackingFPGAIntegration::BenchmarkAlg:

Public Member Functions

virtual StatusCode initialize () override final
 Detect the OpenCL devices and prepare OpenCL context. More...
 
virtual StatusCode execute (const EventContext &ctx) const override final
 Should be overriden by derived classes to perform meaningful work. More...
 
virtual StatusCode finalize () override final
 
StatusCode runPassThrough (std::vector< uint64_t > &pixelChainOutput, std::vector< uint64_t > &stripChainOutput, const EventContext &ctx) const
 
StatusCode runDataPrep (std::vector< uint64_t > &pixelChainOutput, std::vector< uint64_t > &stripChainOutput, const EventContext &ctx) const
 
StatusCode loadProgram (const std::string &xclbin)
 Find the xclbin file and load it into the OpenCL program object. More...
 
StatusCode precheck (const std::vector< Gaudi::Property< std::string >> &inputs) const
 Check if the the desired Gaudi properties are set. More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
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. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Protected Attributes

cl::Device m_accelerator
 Device object for the accelerator card. More...
 
cl::Context m_context
 Context object for the application. More...
 
cl::Program m_program
 Program object containing the kernel. More...
 
Gaudi::Property< std::string > m_deviceBDF {this, "bdfID", "", "BDF ID of the accelerator card"}
 BDF ID of the accelerator card. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< IChronoSvc > m_chronoSvc
 Service for timing the algorithm. More...
 
ToolHandle< xAODClusterMakerm_xaodClusterMaker
 Tool for creating xAOD containers. More...
 
ToolHandle< TestVectorToolm_testVectorTool
 Tool for preparing test vectors. More...
 
ToolHandle< FPGADataFormatToolm_FPGADataFormatTool
 Tool for formatting FPGA data. More...
 
SG::ReadHandleKey< xAOD::PixelClusterContainerm_inputPixelClusterKey
 Key to access input pixel clusters. More...
 
SG::ReadHandleKey< xAOD::StripClusterContainerm_inputStripClusterKey
 Key to access input strip clusters. More...
 
SG::ReadHandleKey< PixelRDO_Containerm_pixelRDOKey {this, "PixelRDO", "ITkPixelRDOs"}
 
SG::ReadHandleKey< SCT_RDO_Containerm_stripRDOKey {this, "StripRDO", "ITkStripRDOs"}
 
Gaudi::Property< std::string > m_xclbin
 Path and name of the xclbin file. More...
 
Gaudi::Property< std::string > m_edmKernelName
 Name of the FPGA kernel. More...
 
Gaudi::Property< std::string > m_pixelClusterKernelName
 Name of the pixel clustering kernel. More...
 
Gaudi::Property< std::string > m_stripClusterKernelName
 Name of the strip clustering kernel. More...
 
Gaudi::Property< std::string > m_pixelL2GKernelName
 Name of the pixel L2G kernel. More...
 
Gaudi::Property< std::string > m_stripL2GKernelName
 Name of the strip L2G kernelS. More...
 
Gaudi::Property< bool > m_runPassThrough
 Run the pass-through kernel. More...
 
std::atomic< ulonglong > m_numEvents {0}
 Number of events processed. More...
 
std::atomic< cl_ulong > m_pixelInputTime {0}
 Time for pixel input buffer write. More...
 
std::atomic< cl_ulong > m_stripInputTime {0}
 Time for strip input buffer write. More...
 
std::atomic< cl_ulong > m_pixelClusteringTime {0}
 Time for pixel clustering. More...
 
std::atomic< cl_ulong > m_stripClusteringTime {0}
 Time for strip clustering. More...
 
std::atomic< cl_ulong > m_pixelL2GTime {0}
 Time for pixel L2G. More...
 
std::atomic< cl_ulong > m_stripL2GTime {0}
 Time for strip L2G. More...
 
std::atomic< cl_ulong > m_edmPrepTime {0}
 Time for EDM preparation. More...
 
std::atomic< cl_ulong > m_pixelOutputTime {0}
 Time for pixel output buffer read. More...
 
std::atomic< cl_ulong > m_stripOutputTime {0}
 Time for strip output buffer read. More...
 
std::atomic< cl_ulong > m_kernelTime {0}
 Time for kernel execution. More...
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
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 35 of file BenchmarkAlg.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
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.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64 {
65  return 0;
66 }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ 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.

95 { return m_detStore; }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

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

Should be overriden by derived classes to perform meaningful work.

Reimplemented from IntegrationBase.

Definition at line 46 of file BenchmarkAlg.cxx.

47  {
48  ATH_MSG_DEBUG("Executing BenchmarkAlg");
49  m_numEvents++;
50 
51  // Create host side output vectors
52  std::vector<uint64_t> pixelOutput(EFTrackingTransient::PIXEL_CONTAINER_BUF_SIZE, 0);
53  std::vector<uint64_t> stripOutput(EFTrackingTransient::STRIP_CONTAINER_BUF_SIZE, 0);
54 
55  if (m_runPassThrough)
56  {
57  ATH_CHECK(runPassThrough(pixelOutput, stripOutput, ctx));
58  }
59  else // using the actual FPGA kernel chain
60  {
61  ATH_CHECK(runDataPrep(pixelOutput, stripOutput, ctx));
62  }
63 
64  // use 64-bit pointer to access output
65  uint64_t *stripClusters = stripOutput.data();
66  uint64_t *pixelClusters = pixelOutput.data();
67 
68  unsigned int numStripClusters = stripClusters[0];
69  ATH_MSG_DEBUG("numStripClusters: " << numStripClusters);
70 
71  unsigned int numPixelClusters = pixelClusters[0];
72  ATH_MSG_DEBUG("numPixelClusters: " << numPixelClusters);
73 
74  std::unique_ptr<EFTrackingTransient::Metadata> metadata =
75  std::make_unique<EFTrackingTransient::Metadata>();
76 
77  metadata->numOfStripClusters = numStripClusters;
78  metadata->scRdoIndexSize = numStripClusters;
79  metadata->numOfPixelClusters = numPixelClusters;
80  metadata->pcRdoIndexSize = numPixelClusters;
81 
84 
85  // Declare a few vairiables to be used in the loop
86  int row = 0;
87  uint64_t rdo;
88  int rdoCounter = 0;
89 
90  // Make strip cluster aux input
91  {
92  Athena::Chrono chrono("Make strip cluster container", m_chronoSvc.get());
93  for (unsigned int i = 0; i < numStripClusters; i++)
94  {
95  rdoCounter = 0;
96  row = 0; // idhash
97  scAux.idHash.push_back(stripClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
98  row = 1; // id
99  scAux.id.push_back(stripClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
100  row = 2; // rdo w1
101  rdo = stripClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8];
102  if (rdo)
103  {
104  scAux.rdoList.push_back(rdo);
105  rdoCounter++;
106  }
107  row = 3; // rdo w2
108  rdo = stripClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8];
109  if (rdo)
110  {
111  scAux.rdoList.push_back(rdo);
112  rdoCounter++;
113  }
114  row = 4; // rdo w3
115  rdo = stripClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8];
116  if (rdo)
117  {
118  scAux.rdoList.push_back(rdo);
119  rdoCounter++;
120  }
121  row = 5; // rdo w4
122  rdo = stripClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8];
123  if (rdo)
124  {
125  scAux.rdoList.push_back(rdo);
126  rdoCounter++;
127  }
128  row = 6; // local x
129  scAux.localPosition.push_back(*(double *)&stripClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
130  row = 8; // local covariance xx
131  scAux.localCovariance.push_back(*(double *)&stripClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
132  row = 9; // global x
133  scAux.globalPosition.push_back(*(double *)&stripClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
134  row = 10; // global y
135  scAux.globalPosition.push_back(*(double *)&stripClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
136  row = 11; // global z
137  scAux.globalPosition.push_back(*(double *)&stripClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
138  row = 12; // channels in phi
139  scAux.channelsInPhi.push_back(stripClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
140 
141  metadata->scRdoIndex[i] = rdoCounter;
142  }
143  ATH_CHECK(m_xaodClusterMaker->makeStripClusterContainer(scAux, metadata.get(), ctx));
144  // print out the strip cluster aux input
145  if (msgLvl(MSG::DEBUG))
146  {
147  for (unsigned int i = 0; i < numStripClusters; i++)
148  {
149  ATH_MSG_DEBUG("Strip cluster " << i << " idHash: " << scAux.idHash[i]);
150  ATH_MSG_DEBUG("Strip cluster " << i << " id: " << scAux.id[i]);
151  ATH_MSG_DEBUG("Strip cluster " << i << " localPosition x: " << scAux.localPosition[i]);
152  ATH_MSG_DEBUG("Strip cluster " << i << " localCovariance: " << scAux.localCovariance[i]);
153  ATH_MSG_DEBUG("Strip cluster " << i << " globalPosition x: " << scAux.globalPosition[i * 3]);
154  ATH_MSG_DEBUG("Strip cluster " << i << " globalPosition y: " << scAux.globalPosition[i * 3 + 1]);
155  ATH_MSG_DEBUG("Strip cluster " << i << " globalPosition z: " << scAux.globalPosition[i * 3 + 2]);
156  ATH_MSG_DEBUG("Strip cluster " << i << " channelsInPhi: " << scAux.channelsInPhi[i]);
157  ATH_MSG_DEBUG("Strip cluster " << i << " rdoList size: " << metadata->scRdoIndex[i]);
158  }
159  }
160  }
161 
162  // Make pixel cluster aux input
163  {
164  Athena::Chrono chrono("Make pixel cluster container", m_chronoSvc.get());
165  for (unsigned int i = 0; i < numPixelClusters; i++)
166  {
167  rdoCounter = 0;
168  row = 0; // id hash
169  pcAux.idHash.push_back(pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
170 
171  row = 1; // id
172  pcAux.id.push_back(pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
173 
174  row = 2; // rdo w1
175  rdo = pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8];
176  if (rdo)
177  {
178  pcAux.rdoList.push_back(rdo);
179  rdoCounter++;
180  }
181 
182  row = 3; // rdo w2
183  rdo = pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8];
184  if (rdo)
185  {
186  pcAux.rdoList.push_back(rdo);
187  rdoCounter++;
188  }
189 
190  row = 4; // rdo w3
191  rdo = pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8];
192  if (rdo)
193  {
194  pcAux.rdoList.push_back(rdo);
195  rdoCounter++;
196  }
197 
198  row = 5; // rdo w4
199  rdo = pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8];
200  if (rdo)
201  {
202  pcAux.rdoList.push_back(rdo);
203  rdoCounter++;
204  }
205 
206  row = 6; // local x
207  pcAux.localPosition.push_back(*(double *)&pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
208 
209  row = 7; // local y
210  pcAux.localPosition.push_back(*(double *)&pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
211 
212  row = 8; // local covariance xx
213  pcAux.localCovariance.push_back(*(double *)&pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
214 
215  row = 9; // local covariance yy
216  pcAux.localCovariance.push_back(*(double *)&pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
217 
218  row = 10; // global x
219  pcAux.globalPosition.push_back(*(double *)&pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
220 
221  row = 11; // global y
222  pcAux.globalPosition.push_back(*(double *)&pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
223 
224  row = 12; // global z
225  pcAux.globalPosition.push_back(*(double *)&pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
226 
227  row = 13; // channels in phi
228  pcAux.channelsInPhi.push_back(pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
229 
230  row = 14; // channels in eta
231  pcAux.channelsInEta.push_back(pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
232 
233  row = 15; // width in eta
234  pcAux.widthInEta.push_back(*(double *)&pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
235 
236  row = 16; // omega x
237  pcAux.omegaX.push_back(*(double *)&pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
238 
239  row = 17; // omega y
240  pcAux.omegaY.push_back(*(double *)&pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
241 
242  row = 18; // total ToT
243  pcAux.totalToT.push_back(pixelClusters[row * EFTrackingTransient::MAX_NUM_CLUSTERS + i + 8]);
244 
245  metadata->pcRdoIndex[i] = rdoCounter;
246  }
247 
248  ATH_CHECK(m_xaodClusterMaker->makePixelClusterContainer(pcAux, metadata.get(), ctx));
249 
250  // print out pixel cluster aux input
251  if (msgLvl(MSG::DEBUG))
252  {
253  for (unsigned int i = 0; i < numPixelClusters; i++)
254  {
255  ATH_MSG_DEBUG("Pixel cluster " << i << " idHash: " << pcAux.idHash[i]);
256  ATH_MSG_DEBUG("Pixel cluster " << i << " id: " << pcAux.id[i]);
257  ATH_MSG_DEBUG("Pixel cluster " << i << " localPosition x: " << pcAux.localPosition[i * 2]);
258  ATH_MSG_DEBUG("Pixel cluster " << i << " localPosition y: " << pcAux.localPosition[i * 2 + 1]);
259  ATH_MSG_DEBUG("Pixel cluster " << i << " localCovariance xx: " << pcAux.localCovariance[i * 2]);
260  ATH_MSG_DEBUG("Pixel cluster " << i << " localCovariance yy: " << pcAux.localCovariance[i * 2 + 1]);
261  ATH_MSG_DEBUG("Pixel cluster " << i << " globalPosition x: " << pcAux.globalPosition[i * 3]);
262  ATH_MSG_DEBUG("Pixel cluster " << i << " globalPosition y: " << pcAux.globalPosition[i * 3 + 1]);
263  ATH_MSG_DEBUG("Pixel cluster " << i << " globalPosition z: " << pcAux.globalPosition[i * 3 + 2]);
264  ATH_MSG_DEBUG("Pixel cluster " << i << " channelsInPhi: " << pcAux.channelsInPhi[i]);
265  ATH_MSG_DEBUG("Pixel cluster " << i << " channelsInEta: " << pcAux.channelsInEta[i]);
266  ATH_MSG_DEBUG("Pixel cluster " << i << " widthInEta: " << pcAux.widthInEta[i]);
267  ATH_MSG_DEBUG("Pixel cluster " << i << " omegaX: " << pcAux.omegaX[i]);
268  ATH_MSG_DEBUG("Pixel cluster " << i << " omegaY: " << pcAux.omegaY[i]);
269  ATH_MSG_DEBUG("Pixel cluster " << i << " totalToT: " << pcAux.totalToT[i]);
270  ATH_MSG_DEBUG("Pixel cluster " << i << " rdoList size: " << metadata->pcRdoIndex[i]);
271  }
272  }
273  }
274 
275  return StatusCode::SUCCESS;
276  }

◆ 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
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  }
96  return BaseAlg::extraOutputDeps();
97 }

◆ 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  }

◆ finalize()

StatusCode EFTrackingFPGAIntegration::BenchmarkAlg::finalize ( )
finaloverridevirtual

Definition at line 530 of file BenchmarkAlg.cxx.

531  {
532  if (!m_runPassThrough)
533  {
534  ATH_MSG_INFO("Finalizing BenchmarkAlg");
535  ATH_MSG_INFO("Number of events: " << m_numEvents);
536  ATH_MSG_INFO("Pixel input time: " << m_pixelInputTime / m_numEvents / 1e6 << " ms");
537  ATH_MSG_INFO("Strip input time: " << m_stripInputTime / m_numEvents / 1e6 << " ms");
538  ATH_MSG_INFO("Pixel clustering time: " << m_pixelClusteringTime / m_numEvents / 1e6 << " ms");
539  ATH_MSG_INFO("Strip clustering time: " << m_stripClusteringTime / m_numEvents / 1e6 << " ms");
540  ATH_MSG_INFO("Pixel L2G time: " << m_pixelL2GTime / m_numEvents / 1e6 << " ms");
541  ATH_MSG_INFO("Strip L2G time: " << m_stripL2GTime / m_numEvents / 1e6 << " ms");
542  ATH_MSG_INFO("EDMPrep time: " << m_edmPrepTime / m_numEvents / 1e6 << " ms");
543  ATH_MSG_INFO("Kernel execution time: " << m_kernelTime / m_numEvents / 1e6 << " ms");
544  ATH_MSG_INFO("Pixel output time: " << m_pixelOutputTime / m_numEvents / 1e6 << " ms");
545  ATH_MSG_INFO("Strip output time: " << m_stripOutputTime / m_numEvents / 1e6 << " ms");
546  }
547 
548  return StatusCode::SUCCESS;
549  }

◆ initialize()

StatusCode EFTrackingFPGAIntegration::BenchmarkAlg::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 17 of file BenchmarkAlg.cxx.

18  {
19  ATH_MSG_INFO("Running on the FPGA accelerator");
20 
22 
23  ATH_CHECK(m_chronoSvc.retrieve());
24 
25  {
26  Athena::Chrono chrono("Platform and device initlize", m_chronoSvc.get());
28  }
29 
30  {
31  Athena::Chrono chrono("CL::loadProgram", m_chronoSvc.get());
33  }
34 
39 
40  ATH_CHECK(m_xaodClusterMaker.retrieve());
41  ATH_CHECK(m_testVectorTool.retrieve());
42  ATH_CHECK(m_FPGADataFormatTool.retrieve());
43  return StatusCode::SUCCESS;
44  }

◆ 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()

bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::isClonable
overridevirtualinherited

Specify if the algorithm is clonable.

Reentrant algorithms are clonable.

Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.

52 {
53  // Reentrant algorithms are clonable.
54  return true;
55 }

◆ loadProgram()

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

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

Definition at line 102 of file IntegrationBase.cxx.

103 {
104  // Open binary object in binary mode
105  std::ifstream bin_file(xclbin, std::ios_base::binary);
106  if (!bin_file)
107  {
108  ATH_MSG_ERROR("Couldn't find the xclbin file: " << xclbin);
109  return StatusCode::FAILURE;
110  }
111  // Get the size of the binary file
112  bin_file.seekg(0, bin_file.end);
113  unsigned bin_size = bin_file.tellg();
114  // Reset the reference point back to the beginning
115  bin_file.seekg(0, bin_file.beg);
116  // Create a new pointer for the binary buffer and get the set a pointer to the binary buffer
117  std::vector<char> buf(bin_size);
118  bin_file.read(buf.data(), bin_size);
119 
120  // Create binary object and program object
121  cl_int err = 0;
122  std::vector<cl_int> binaryStatus;
123  cl::Program::Binaries bins{{buf.data(), bin_size}};
124  m_program = cl::Program(m_context, {m_accelerator}, bins, &binaryStatus, &err);
125 
126  bin_file.close();
127 
128  if (err == CL_SUCCESS && binaryStatus.at(0) == CL_SUCCESS)
129  {
130  ATH_MSG_INFO("Successfully loaded xclbin file into " << m_accelerator.getInfo<CL_DEVICE_NAME>());
131  }
132  else
133  {
134  ATH_MSG_ERROR("Error loading xclbin file (" << xclbin << ") into " << m_accelerator.getInfo<CL_DEVICE_NAME>() <<". Error code: " << err);
135  return StatusCode::FAILURE;
136  }
137 
138  return StatusCode::SUCCESS;
139 }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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 141 of file IntegrationBase.cxx.

142 {
143  for(const auto &item : inputs)
144  {
145  if(item.empty())
146  {
147  ATH_MSG_FATAL(item.documentation()<<" is empty. Please set it to a valid value");
148  return StatusCode::FAILURE;
149  }
150  }
151 
152  // Always check if bdf is set
153  if (m_deviceBDF.empty())
154  {
155  ATH_MSG_WARNING("Device BDF is not set. Using the first found accelerator card. Set property 'bdfID' to specify the BDF of the device.");
156  }
157 
158  return StatusCode::SUCCESS;
159 }

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
366  }

◆ runDataPrep()

StatusCode EFTrackingFPGAIntegration::BenchmarkAlg::runDataPrep ( std::vector< uint64_t > &  pixelChainOutput,
std::vector< uint64_t > &  stripChainOutput,
const EventContext &  ctx 
) const

Definition at line 339 of file BenchmarkAlg.cxx.

340  {
341  ATH_MSG_DEBUG("Running DataPrep on FPGA");
342  cl_int err = 0;
343 
344  // Get the RDOs from the SG
345  auto pixelRDOHandle = SG::makeHandle(m_pixelRDOKey, ctx);
346  auto stripRDOHandle = SG::makeHandle(m_stripRDOKey, ctx);
347 
348  // Encode RDO into byte stream
349  std::vector<uint64_t> encodedPixelRDO;
350  std::vector<uint64_t> encodedStripRDO;
351 
352  // Encode RDOs into byte stream
353  ATH_CHECK(m_FPGADataFormatTool->convertPixelHitsToFPGADataFormat(*pixelRDOHandle, encodedPixelRDO, ctx));
354  ATH_CHECK(m_FPGADataFormatTool->convertStripHitsToFPGADataFormat(*stripRDOHandle, encodedStripRDO, ctx));
355 
356  for (unsigned int i = 0; i < encodedPixelRDO.size(); i++)
357  {
358  ATH_MSG_DEBUG("Pixel RDO[" << i << "]: " << std::hex << encodedPixelRDO[i] << std::dec);
359  }
360  for (unsigned int i = 0; i < encodedStripRDO.size(); i++)
361  {
362  ATH_MSG_DEBUG("Strip RDO[" << i << "]: " << std::hex << encodedStripRDO[i] << std::dec);
363  }
364 
365  // Create local CL buffers
366  // Clustering
367  cl::Buffer pixelClusterInputBuffer(m_context, CL_MEM_READ_ONLY, sizeof(uint64_t) * encodedPixelRDO.size(), NULL, &err);
368  cl::Buffer stripClusterInputBuffer(m_context, CL_MEM_READ_ONLY, sizeof(uint64_t) * encodedStripRDO.size(), NULL, &err);
369  cl::Buffer pixelClusterOutputBuffer(m_context, CL_MEM_READ_WRITE, sizeof(uint64_t) * encodedPixelRDO.size(), NULL, &err); // Don't care in DataPrep
370  cl::Buffer stripClusterOutputBuffer(m_context, CL_MEM_READ_WRITE, sizeof(uint64_t) * encodedStripRDO.size(), NULL, &err); // Don't care in DataPrep
371  cl::Buffer pixelClusterEDMOutputBuffer(m_context, CL_MEM_READ_WRITE, sizeof(uint64_t) * encodedPixelRDO.size() * EFTrackingTransient::NUM_PIXEL_WORD, NULL, &err);
372  cl::Buffer stripClusterEDMOutputBuffer(m_context, CL_MEM_READ_WRITE, sizeof(uint64_t) * encodedStripRDO.size() * EFTrackingTransient::NUM_STRIP_WORD, NULL, &err);
373  // L2G
374  cl::Buffer pixelL2GOutputBuffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::PIXEL_BLOCK_BUF_SIZE * sizeof(uint64_t), NULL, &err); // Don't care in DataPrep
375  cl::Buffer stripL2GOutputBuffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), NULL, &err); // Don't care in DataPrep
376  cl::Buffer pixelL2GEDMOutputBuffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::PIXEL_BLOCK_BUF_SIZE * sizeof(uint64_t), NULL, &err);
377  cl::Buffer stripL2GEDMOutputBuffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), NULL, &err);
378  // EDMPrep
379  cl::Buffer edmPixelOutputBuffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::PIXEL_CONTAINER_BUF_SIZE * sizeof(uint64_t), NULL, &err);
380  cl::Buffer edmStripOutputBuffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_CONTAINER_BUF_SIZE * sizeof(uint64_t), NULL, &err);
381 
382  // Create local CL kernel objects
383  // Clustering
384  // Kernel names are hard-coded for the current development
385  cl::Kernel pixelClusteringKernel(m_program, m_pixelClusterKernelName.value().data());
386  pixelClusteringKernel.setArg<cl::Buffer>(0, pixelClusterInputBuffer);
387  pixelClusteringKernel.setArg<cl::Buffer>(1, pixelClusterOutputBuffer);
388  pixelClusteringKernel.setArg<cl::Buffer>(2, pixelClusterEDMOutputBuffer);
389 
390  cl::Kernel stripClusteringKernel(m_program, m_stripClusterKernelName.value().data());
391  stripClusteringKernel.setArg<cl::Buffer>(0, stripClusterInputBuffer);
392  stripClusteringKernel.setArg<cl::Buffer>(1, stripClusterOutputBuffer);
393  stripClusteringKernel.setArg<cl::Buffer>(2, stripClusterEDMOutputBuffer);
394  stripClusteringKernel.setArg<unsigned int>(3, encodedStripRDO.size());
395 
396  // L2G
397  cl::Kernel pixelL2GKernel(m_program, m_pixelL2GKernelName.value().data());
398  pixelL2GKernel.setArg<cl::Buffer>(0, pixelClusterOutputBuffer);
399  pixelL2GKernel.setArg<cl::Buffer>(1, pixelClusterEDMOutputBuffer);
400  pixelL2GKernel.setArg<cl::Buffer>(2, pixelL2GOutputBuffer);
401  pixelL2GKernel.setArg<cl::Buffer>(3, pixelL2GEDMOutputBuffer);
402 
403  cl::Kernel stripL2GKernel(m_program, m_stripL2GKernelName.value().data());
404  stripL2GKernel.setArg<cl::Buffer>(0, stripClusterOutputBuffer);
405  stripL2GKernel.setArg<cl::Buffer>(1, stripClusterEDMOutputBuffer);
406  stripL2GKernel.setArg<cl::Buffer>(2, stripL2GOutputBuffer);
407  stripL2GKernel.setArg<cl::Buffer>(3, stripL2GEDMOutputBuffer);
408 
409  // Create EDMPrep kernel object and connect to buffers
410  cl::Kernel edmPrepKernel(m_program, m_edmKernelName.value().data());
411  edmPrepKernel.setArg<cl::Buffer>(0, pixelL2GEDMOutputBuffer);
412  edmPrepKernel.setArg<cl::Buffer>(1, stripL2GEDMOutputBuffer);
413  edmPrepKernel.setArg<cl::Buffer>(2, edmPixelOutputBuffer);
414  edmPrepKernel.setArg<cl::Buffer>(3, edmStripOutputBuffer);
415 
416  cl::CommandQueue acc_queue(m_context, m_accelerator, CL_QUEUE_PROFILING_ENABLE, &err);
417 
418  cl::Event cl_evt_write_pixel_input;
419  cl::Event cl_evt_write_strip_input;
420  acc_queue.enqueueWriteBuffer(pixelClusterInputBuffer, CL_FALSE, 0, sizeof(uint64_t) * encodedPixelRDO.size(), encodedPixelRDO.data(), NULL, &cl_evt_write_pixel_input);
421  acc_queue.enqueueWriteBuffer(stripClusterInputBuffer, CL_FALSE, 0, sizeof(uint64_t) * encodedStripRDO.size(), encodedStripRDO.data(), NULL, &cl_evt_write_strip_input);
422  std::vector<cl::Event> cl_evt_vec_pixel_input{cl_evt_write_pixel_input};
423  std::vector<cl::Event> cl_evt_vec_strip_input{cl_evt_write_strip_input};
424  // Ideally, `finish` shouldn't be here because the kernels are invoked by event dependencies,
425  // but we use this to temporarily enable kernel profiling.
426  acc_queue.finish();
427 
428  cl::Event cl_evt_pixel_clustering;
429  cl::Event cl_evt_strip_clustering;
430  cl::Event cl_evt_pixel_l2g;
431  cl::Event cl_evt_strip_l2g;
432  cl::Event cl_evt_edm_prep;
433  {
434  Athena::Chrono chrono("Kernel execution", m_chronoSvc.get());
435  acc_queue.enqueueTask(pixelClusteringKernel, &cl_evt_vec_pixel_input, &cl_evt_pixel_clustering);
436  acc_queue.enqueueTask(stripClusteringKernel, &cl_evt_vec_strip_input, &cl_evt_strip_clustering);
437 
438  std::vector<cl::Event> cl_evt_vec_pixel_clustering{cl_evt_pixel_clustering};
439  std::vector<cl::Event> cl_evt_vec_strip_clustering{cl_evt_strip_clustering};
440  acc_queue.enqueueTask(pixelL2GKernel, &cl_evt_vec_pixel_clustering, &cl_evt_pixel_l2g);
441  acc_queue.enqueueTask(stripL2GKernel, &cl_evt_vec_strip_clustering, &cl_evt_strip_l2g);
442  std::vector<cl::Event> cl_evt_vec_l2g{cl_evt_pixel_l2g, cl_evt_strip_l2g};
443 
444  acc_queue.enqueueTask(edmPrepKernel, &cl_evt_vec_l2g, &cl_evt_edm_prep);
445  // Ideally, `finish` shouldn't be here because the kernels are invoked by event dependencies,
446  // but we use this to temporarily enable kernel profiling. CPU wall time
447  acc_queue.finish();
448  }
449 
450  cl::Event cl_evt_pixel_cluster_output;
451  cl::Event cl_evt_strip_cluster_output;
452  acc_queue.enqueueReadBuffer(edmPixelOutputBuffer, CL_FALSE, 0, sizeof(uint64_t) * pixelChainOutput.size(), pixelChainOutput.data(), NULL, &cl_evt_pixel_cluster_output);
453  acc_queue.enqueueReadBuffer(edmStripOutputBuffer, CL_FALSE, 0, sizeof(uint64_t) * stripChainOutput.size(), stripChainOutput.data(), NULL, &cl_evt_strip_cluster_output);
454  acc_queue.finish();
455 
456  // calculate the time for the kernel execution
457  // get the time of writing pixel input buffer
458  cl_ulong pixel_input_start = cl_evt_write_pixel_input.getProfilingInfo<CL_PROFILING_COMMAND_START>();
459  cl_ulong pixel_input_end = cl_evt_write_pixel_input.getProfilingInfo<CL_PROFILING_COMMAND_END>();
460  cl_ulong pixel_input_time = pixel_input_end - pixel_input_start;
461  m_pixelInputTime += pixel_input_time;
462  ATH_MSG_DEBUG("Pixel input buffer write time: " << pixel_input_time / 1e6 << " ms");
463 
464  // get the time of writing strip input buffer
465  cl_ulong strip_input_start = cl_evt_write_strip_input.getProfilingInfo<CL_PROFILING_COMMAND_START>();
466  cl_ulong strip_input_end = cl_evt_write_strip_input.getProfilingInfo<CL_PROFILING_COMMAND_END>();
467  cl_ulong strip_input_time = strip_input_end - strip_input_start;
468  m_stripInputTime += strip_input_time;
469  ATH_MSG_DEBUG("Strip input buffer write time: " << strip_input_time / 1e6 << " ms");
470 
471  // get the time of pixel clustering
472  cl_ulong pixel_clustering_start = cl_evt_pixel_clustering.getProfilingInfo<CL_PROFILING_COMMAND_START>();
473  cl_ulong pixel_clustering_end = cl_evt_pixel_clustering.getProfilingInfo<CL_PROFILING_COMMAND_END>();
474  cl_ulong pixel_clustering_time = pixel_clustering_end - pixel_clustering_start;
475  m_pixelClusteringTime += pixel_clustering_time;
476  ATH_MSG_DEBUG("Pixel clustering time: " << pixel_clustering_time / 1e6 << " ms");
477 
478  // get the time of strip clustering
479  cl_ulong strip_clustering_start = cl_evt_strip_clustering.getProfilingInfo<CL_PROFILING_COMMAND_START>();
480  cl_ulong strip_clustering_end = cl_evt_strip_clustering.getProfilingInfo<CL_PROFILING_COMMAND_END>();
481  cl_ulong strip_clustering_time = strip_clustering_end - strip_clustering_start;
482  m_stripClusteringTime += strip_clustering_time;
483  ATH_MSG_DEBUG("Strip clustering time: " << strip_clustering_time / 1e6 << " ms");
484 
485  // get the time of pixel L2G
486  cl_ulong pixel_l2g_start = cl_evt_pixel_l2g.getProfilingInfo<CL_PROFILING_COMMAND_START>();
487  cl_ulong pixel_l2g_end = cl_evt_pixel_l2g.getProfilingInfo<CL_PROFILING_COMMAND_END>();
488  cl_ulong pixel_l2g_time = pixel_l2g_end - pixel_l2g_start;
489  m_pixelL2GTime += pixel_l2g_time;
490  ATH_MSG_DEBUG("Pixel L2G time: " << pixel_l2g_time / 1e6 << " ms");
491 
492  // get the time of strip L2G
493  cl_ulong strip_l2g_start = cl_evt_strip_l2g.getProfilingInfo<CL_PROFILING_COMMAND_START>();
494  cl_ulong strip_l2g_end = cl_evt_strip_l2g.getProfilingInfo<CL_PROFILING_COMMAND_END>();
495  cl_ulong strip_l2g_time = strip_l2g_end - strip_l2g_start;
496  m_stripL2GTime += strip_l2g_time;
497  ATH_MSG_DEBUG("Strip L2G time: " << strip_l2g_time / 1e6 << " ms");
498 
499  // get the time of EDMPrep
500  cl_ulong edm_prep_start = cl_evt_edm_prep.getProfilingInfo<CL_PROFILING_COMMAND_START>();
501  cl_ulong edm_prep_end = cl_evt_edm_prep.getProfilingInfo<CL_PROFILING_COMMAND_END>();
502  cl_ulong edm_prep_time = edm_prep_end - edm_prep_start;
503  m_edmPrepTime += edm_prep_time;
504  ATH_MSG_DEBUG("EDMPrep time: " << edm_prep_time / 1e6 << " ms");
505 
506  // get the time of the whole kernel execution
507  cl_ulong kernel_start = cl_evt_pixel_clustering.getProfilingInfo<CL_PROFILING_COMMAND_QUEUED>();
508  cl_ulong kernel_end = cl_evt_edm_prep.getProfilingInfo<CL_PROFILING_COMMAND_END>();
509  cl_ulong kernel_time = kernel_end - kernel_start;
510  m_kernelTime += kernel_time;
511  ATH_MSG_DEBUG("Kernel execution time: " << kernel_time / 1e6 << " ms");
512 
513  // get the time of reading pixel output buffer
514  cl_ulong pixel_output_start = cl_evt_pixel_cluster_output.getProfilingInfo<CL_PROFILING_COMMAND_START>();
515  cl_ulong pixel_output_end = cl_evt_pixel_cluster_output.getProfilingInfo<CL_PROFILING_COMMAND_END>();
516  cl_ulong pixel_output_time = pixel_output_end - pixel_output_start;
517  m_pixelOutputTime += pixel_output_time;
518  ATH_MSG_DEBUG("Pixel output buffer read time: " << pixel_output_time / 1e6 << " ms");
519 
520  // get the time of reading strip output buffer
521  cl_ulong strip_output_start = cl_evt_strip_cluster_output.getProfilingInfo<CL_PROFILING_COMMAND_START>();
522  cl_ulong strip_output_end = cl_evt_strip_cluster_output.getProfilingInfo<CL_PROFILING_COMMAND_END>();
523  cl_ulong strip_output_time = strip_output_end - strip_output_start;
524  m_stripOutputTime += strip_output_time;
525  ATH_MSG_DEBUG("Strip output buffer read time: " << strip_output_time / 1e6 << " ms");
526 
527  return StatusCode::SUCCESS;
528  }

◆ runPassThrough()

StatusCode EFTrackingFPGAIntegration::BenchmarkAlg::runPassThrough ( std::vector< uint64_t > &  pixelChainOutput,
std::vector< uint64_t > &  stripChainOutput,
const EventContext &  ctx 
) const

Definition at line 278 of file BenchmarkAlg.cxx.

279  {
280  cl_int err = 0;
281 
282  // Load the ITk clusters from SG
284  if (!scContainerHandle.isValid())
285  {
286  ATH_MSG_ERROR("Failed to retrieve: " << m_inputStripClusterKey);
287  return StatusCode::FAILURE;
288  }
289 
291  if (!pcContainerHandle.isValid())
292  {
293  ATH_MSG_ERROR("Failed to retrieve: " << m_inputPixelClusterKey);
294  return StatusCode::FAILURE;
295  }
296 
297  // Encode ITK clusters into byte stream
298  std::vector<uint64_t> encodedStripClusters;
299  std::vector<uint64_t> encodedPixelClusters;
300  ATH_CHECK(m_testVectorTool->encodeStripL2G(scContainerHandle.get(), encodedStripClusters));
301  ATH_CHECK(m_testVectorTool->encodePixelL2G(pcContainerHandle.get(), encodedPixelClusters));
302 
303  // Create local CL buffers and kernel object for pixel and strip
304  cl::Buffer inputPixelBuffer(m_context, CL_MEM_READ_ONLY, EFTrackingTransient::PIXEL_BLOCK_BUF_SIZE * sizeof(uint64_t), NULL, &err);
305  cl::Buffer inputStripBuffer(m_context, CL_MEM_READ_ONLY, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), NULL, &err);
306  cl::Buffer outputPixelBuffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::PIXEL_CONTAINER_BUF_SIZE * sizeof(uint64_t), NULL, &err);
307  cl::Buffer outputStripBuffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_CONTAINER_BUF_SIZE * sizeof(uint64_t), NULL, &err);
308 
309  cl::Kernel kernel(m_program, m_edmKernelName.value().data());
310  kernel.setArg<cl::Buffer>(0, inputPixelBuffer);
311  kernel.setArg<cl::Buffer>(1, inputStripBuffer);
312  kernel.setArg<cl::Buffer>(2, outputPixelBuffer);
313  kernel.setArg<cl::Buffer>(3, outputStripBuffer);
314 
315  // Migrate the input test vectors to the accelerator
316  cl::CommandQueue acc_queue(m_context, m_accelerator);
317  acc_queue.enqueueWriteBuffer(inputPixelBuffer, CL_FALSE, 0, sizeof(uint64_t) * encodedPixelClusters.size(), encodedPixelClusters.data(), NULL, NULL);
318  acc_queue.enqueueWriteBuffer(inputStripBuffer, CL_FALSE, 0, sizeof(uint64_t) * encodedStripClusters.size(), encodedStripClusters.data(), NULL, NULL);
319  acc_queue.finish();
320 
321  // enqueue the kernel
322  {
323  Athena::Chrono chrono("EDMPrep kernel execution", m_chronoSvc.get());
324  acc_queue.enqueueTask(kernel);
325  acc_queue.finish();
326  }
327 
328  // Read back the results
329  {
330  Athena::Chrono chrono("Read buffers", m_chronoSvc.get());
331  acc_queue.enqueueReadBuffer(outputPixelBuffer, CL_FALSE, 0, sizeof(uint64_t) * pixelChainOutput.size(), pixelChainOutput.data(), NULL, NULL);
332  acc_queue.enqueueReadBuffer(outputStripBuffer, CL_FALSE, 0, sizeof(uint64_t) * stripChainOutput.size(), stripChainOutput.data(), NULL, NULL);
333  acc_queue.finish();
334  }
335 
336  return StatusCode::SUCCESS;
337  }

◆ setFilterPassed()

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

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100  {
101  execState( ctx ).setFilterPassed( state );
102  }

◆ 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 InputMakerBase, and HypoBase.

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()) {
123  sc = StatusCode::FAILURE;
124  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125  << " with CondSvc");
126  }
127  }
128  }
129  return sc;
130 }

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ 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::BenchmarkAlg::m_chronoSvc
private
Initial value:
{
"ChronoStatSvc", name()}

Service for timing the algorithm.

Definition at line 46 of file BenchmarkAlg.h.

◆ 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.

◆ m_edmKernelName

Gaudi::Property<std::string> EFTrackingFPGAIntegration::BenchmarkAlg::m_edmKernelName
private
Initial value:
{
this, "EDMPrepKernelName", "", "Name of the FPGA kernel"}

Name of the FPGA kernel.

Definition at line 74 of file BenchmarkAlg.h.

◆ m_edmPrepTime

std::atomic<cl_ulong> EFTrackingFPGAIntegration::BenchmarkAlg::m_edmPrepTime {0}
mutableprivate

Time for EDM preparation.

Definition at line 99 of file BenchmarkAlg.h.

◆ 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_FPGADataFormatTool

ToolHandle<FPGADataFormatTool> EFTrackingFPGAIntegration::BenchmarkAlg::m_FPGADataFormatTool
private
Initial value:
{
this, "FPGADataFormatTool", "FPGADataFormatTool", "Tool for formatting FPGA data"}

Tool for formatting FPGA data.

Definition at line 58 of file BenchmarkAlg.h.

◆ m_inputPixelClusterKey

SG::ReadHandleKey<xAOD::PixelClusterContainer> EFTrackingFPGAIntegration::BenchmarkAlg::m_inputPixelClusterKey
private
Initial value:
{
this, "InputPixelClusterKey", "ITkPixelClusters", "Key to access input pixel clusters"}

Key to access input pixel clusters.

Definition at line 61 of file BenchmarkAlg.h.

◆ m_inputStripClusterKey

SG::ReadHandleKey<xAOD::StripClusterContainer> EFTrackingFPGAIntegration::BenchmarkAlg::m_inputStripClusterKey
private
Initial value:
{
this, "InputStripClusterKey", "ITkStripClusters", "Key to access input strip clusters"}

Key to access input strip clusters.

Definition at line 64 of file BenchmarkAlg.h.

◆ m_kernelTime

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

Time for kernel execution.

Definition at line 102 of file BenchmarkAlg.h.

◆ m_numEvents

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

Number of events processed.

Definition at line 92 of file BenchmarkAlg.h.

◆ m_pixelClusteringTime

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

Time for pixel clustering.

Definition at line 95 of file BenchmarkAlg.h.

◆ m_pixelClusterKernelName

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

Name of the pixel clustering kernel.

Definition at line 77 of file BenchmarkAlg.h.

◆ m_pixelInputTime

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

Time for pixel input buffer write.

Definition at line 93 of file BenchmarkAlg.h.

◆ m_pixelL2GKernelName

Gaudi::Property<std::string> EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelL2GKernelName
private
Initial value:
{
this, "PixelL2GKernelName", "", "Name of the pixel L2G kernel"}

Name of the pixel L2G kernel.

Definition at line 83 of file BenchmarkAlg.h.

◆ m_pixelL2GTime

std::atomic<cl_ulong> EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelL2GTime {0}
mutableprivate

Time for pixel L2G.

Definition at line 97 of file BenchmarkAlg.h.

◆ m_pixelOutputTime

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

Time for pixel output buffer read.

Definition at line 100 of file BenchmarkAlg.h.

◆ m_pixelRDOKey

SG::ReadHandleKey<PixelRDO_Container> EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelRDOKey {this, "PixelRDO", "ITkPixelRDOs"}
private

Definition at line 67 of file BenchmarkAlg.h.

◆ m_program

cl::Program IntegrationBase::m_program
protectedinherited

Program object containing the kernel.

Definition at line 68 of file IntegrationBase.h.

◆ m_runPassThrough

Gaudi::Property<bool> EFTrackingFPGAIntegration::BenchmarkAlg::m_runPassThrough
private
Initial value:
{
this, "runPassThrough", true, "Run the pass-through kernel"}

Run the pass-through kernel.

Definition at line 89 of file BenchmarkAlg.h.

◆ m_stripClusteringTime

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

Time for strip clustering.

Definition at line 96 of file BenchmarkAlg.h.

◆ m_stripClusterKernelName

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

Name of the strip clustering kernel.

Definition at line 80 of file BenchmarkAlg.h.

◆ m_stripInputTime

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

Time for strip input buffer write.

Definition at line 94 of file BenchmarkAlg.h.

◆ m_stripL2GKernelName

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

Name of the strip L2G kernelS.

Definition at line 86 of file BenchmarkAlg.h.

◆ m_stripL2GTime

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

Time for strip L2G.

Definition at line 98 of file BenchmarkAlg.h.

◆ m_stripOutputTime

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

Time for strip output buffer read.

Definition at line 101 of file BenchmarkAlg.h.

◆ m_stripRDOKey

SG::ReadHandleKey<SCT_RDO_Container> EFTrackingFPGAIntegration::BenchmarkAlg::m_stripRDOKey {this, "StripRDO", "ITkStripRDOs"}
private

Definition at line 69 of file BenchmarkAlg.h.

◆ m_testVectorTool

ToolHandle<TestVectorTool> EFTrackingFPGAIntegration::BenchmarkAlg::m_testVectorTool
private
Initial value:
{
this, "TestVectorTool", "TestVectorTool", "Tool for preparing test vectors"}

Tool for preparing test vectors.

Definition at line 55 of file BenchmarkAlg.h.

◆ 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_xaodClusterMaker

ToolHandle<xAODClusterMaker> EFTrackingFPGAIntegration::BenchmarkAlg::m_xaodClusterMaker
private
Initial value:
{
this,
"xAODClusterMaker",
"xAODClusterMaker",
"Tool for creating xAOD cluster containers"}

Tool for creating xAOD containers.

Definition at line 49 of file BenchmarkAlg.h.

◆ m_xclbin

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

Path and name of the xclbin file.

Definition at line 71 of file BenchmarkAlg.h.


The documentation for this class was generated from the following files:
query_example.row
row
Definition: query_example.py:24
EFTrackingTransient::PixelClusterAuxInput::localPosition
std::vector< float > localPosition
Definition: EFTrackingTransient.h:225
EFTrackingFPGAIntegration::BenchmarkAlg::m_edmKernelName
Gaudi::Property< std::string > m_edmKernelName
Name of the FPGA kernel.
Definition: BenchmarkAlg.h:74
IntegrationBase::m_accelerator
cl::Device m_accelerator
Device object for the accelerator card.
Definition: IntegrationBase.h:66
IntegrationBase::initialize
virtual StatusCode initialize() override
Detect the OpenCL devices and prepare OpenCL context.
Definition: IntegrationBase.cxx:16
EFTrackingFPGAIntegration::BenchmarkAlg::m_stripClusteringTime
std::atomic< cl_ulong > m_stripClusteringTime
Time for strip clustering.
Definition: BenchmarkAlg.h:96
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
EFTrackingTransient::PixelClusterAuxInput::channelsInEta
std::vector< int > channelsInEta
Definition: EFTrackingTransient.h:230
EFTrackingFPGAIntegration::BenchmarkAlg::m_chronoSvc
ServiceHandle< IChronoSvc > m_chronoSvc
Service for timing the algorithm.
Definition: BenchmarkAlg.h:46
EFTrackingTransient::PIXEL_CONTAINER_BUF_SIZE
constexpr unsigned long PIXEL_CONTAINER_BUF_SIZE
Definition: EFTrackingTransient.h:34
EFTrackingTransient::PixelClusterAuxInput
The PixelClusterAuxInput struct is used to simplify the creaction of the xAOD::PixelClusterContainer.
Definition: EFTrackingTransient.h:222
EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelL2GKernelName
Gaudi::Property< std::string > m_pixelL2GKernelName
Name of the pixel L2G kernel.
Definition: BenchmarkAlg.h:83
EFTrackingTransient::StripClusterAuxInput::globalPosition
std::vector< float > globalPosition
Definition: EFTrackingTransient.h:212
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
EFTrackingTransient::MAX_NUM_CLUSTERS
constexpr unsigned int MAX_NUM_CLUSTERS
Definition: EFTrackingTransient.h:27
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
JiveXML::Event
struct Event_t Event
Definition: ONCRPCServer.h:65
IntegrationBase::m_context
cl::Context m_context
Context object for the application.
Definition: IntegrationBase.h:67
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelL2GTime
std::atomic< cl_ulong > m_pixelL2GTime
Time for pixel L2G.
Definition: BenchmarkAlg.h:97
EFTrackingTransient::StripClusterAuxInput::localCovariance
std::vector< float > localCovariance
Definition: EFTrackingTransient.h:209
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
EFTrackingFPGAIntegration::BenchmarkAlg::m_inputPixelClusterKey
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_inputPixelClusterKey
Key to access input pixel clusters.
Definition: BenchmarkAlg.h:61
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
postInclude.inputs
inputs
Definition: postInclude.SortInput.py:15
EFTrackingTransient::StripClusterAuxInput::rdoList
std::vector< unsigned long long > rdoList
Definition: EFTrackingTransient.h:213
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelRDOKey
SG::ReadHandleKey< PixelRDO_Container > m_pixelRDOKey
Definition: BenchmarkAlg.h:67
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
EFTrackingFPGAIntegration::BenchmarkAlg::m_stripOutputTime
std::atomic< cl_ulong > m_stripOutputTime
Time for strip output buffer read.
Definition: BenchmarkAlg.h:101
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
python.checkMetadata.metadata
metadata
Definition: checkMetadata.py:175
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:274
EFTrackingFPGAIntegration::BenchmarkAlg::m_stripRDOKey
SG::ReadHandleKey< SCT_RDO_Container > m_stripRDOKey
Definition: BenchmarkAlg.h:69
EFTrackingTransient::PIXEL_BLOCK_BUF_SIZE
constexpr unsigned long PIXEL_BLOCK_BUF_SIZE
Definition: EFTrackingTransient.h:32
AthCommonReentrantAlgorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Definition: AthCommonReentrantAlgorithm.cxx:89
EFTrackingTransient::STRIP_CONTAINER_BUF_SIZE
constexpr unsigned long STRIP_CONTAINER_BUF_SIZE
Definition: EFTrackingTransient.h:35
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Athena::Chrono
Exception-safe IChronoSvc caller.
Definition: Chrono.h:50
EFTrackingTransient::PixelClusterAuxInput::rdoList
std::vector< unsigned long long > rdoList
Definition: EFTrackingTransient.h:228
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:85
EFTrackingTransient::PixelClusterAuxInput::localCovariance
std::vector< float > localCovariance
Definition: EFTrackingTransient.h:226
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
EFTrackingTransient::StripClusterAuxInput::idHash
std::vector< unsigned int > idHash
Definition: EFTrackingTransient.h:210
AthCommonReentrantAlgorithm::sysExecute
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Definition: AthCommonReentrantAlgorithm.cxx:76
IntegrationBase::m_deviceBDF
Gaudi::Property< std::string > m_deviceBDF
BDF ID of the accelerator card.
Definition: IntegrationBase.h:69
EFTrackingTransient::PixelClusterAuxInput::totalToT
std::vector< int > totalToT
Definition: EFTrackingTransient.h:235
EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelInputTime
std::atomic< cl_ulong > m_pixelInputTime
Time for pixel input buffer write.
Definition: BenchmarkAlg.h:93
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
plotting.yearwise_luminosity_vs_mu.bins
bins
Definition: yearwise_luminosity_vs_mu.py:30
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
IntegrationBase::precheck
StatusCode precheck(const std::vector< Gaudi::Property< std::string >> &inputs) const
Check if the the desired Gaudi properties are set.
Definition: IntegrationBase.cxx:141
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
EFTrackingFPGAIntegration::BenchmarkAlg::m_stripL2GKernelName
Gaudi::Property< std::string > m_stripL2GKernelName
Name of the strip L2G kernelS.
Definition: BenchmarkAlg.h:86
EFTrackingFPGAIntegration::BenchmarkAlg::m_FPGADataFormatTool
ToolHandle< FPGADataFormatTool > m_FPGADataFormatTool
Tool for formatting FPGA data.
Definition: BenchmarkAlg.h:58
EFTrackingTransient::NUM_PIXEL_WORD
constexpr unsigned int NUM_PIXEL_WORD
Definition: EFTrackingTransient.h:28
EFTrackingFPGAIntegration::BenchmarkAlg::m_xclbin
Gaudi::Property< std::string > m_xclbin
Path and name of the xclbin file.
Definition: BenchmarkAlg.h:71
EFTrackingTransient::PixelClusterAuxInput::idHash
std::vector< unsigned int > idHash
Definition: EFTrackingTransient.h:224
EFTrackingFPGAIntegration::BenchmarkAlg::m_testVectorTool
ToolHandle< TestVectorTool > m_testVectorTool
Tool for preparing test vectors.
Definition: BenchmarkAlg.h:55
IntegrationBase::loadProgram
StatusCode loadProgram(const std::string &xclbin)
Find the xclbin file and load it into the OpenCL program object.
Definition: IntegrationBase.cxx:102
EFTrackingFPGAIntegration::BenchmarkAlg::m_stripClusterKernelName
Gaudi::Property< std::string > m_stripClusterKernelName
Name of the strip clustering kernel.
Definition: BenchmarkAlg.h:80
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
EFTrackingTransient::StripClusterAuxInput
The StripClusterAuxInput struct is used to simplify the creaction of the xAOD::StripClusterContainer.
Definition: EFTrackingTransient.h:207
EFTrackingFPGAIntegration::BenchmarkAlg::m_xaodClusterMaker
ToolHandle< xAODClusterMaker > m_xaodClusterMaker
Tool for creating xAOD containers.
Definition: BenchmarkAlg.h:49
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
EFTrackingTransient::StripClusterAuxInput::localPosition
std::vector< float > localPosition
Definition: EFTrackingTransient.h:208
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
EFTrackingFPGAIntegration::BenchmarkAlg::m_numEvents
std::atomic< ulonglong > m_numEvents
Number of events processed.
Definition: BenchmarkAlg.h:92
EFTrackingTransient::PixelClusterAuxInput::channelsInPhi
std::vector< int > channelsInPhi
Definition: EFTrackingTransient.h:229
item
Definition: ItemListSvc.h:43
EFTrackingTransient::STRIP_BLOCK_BUF_SIZE
constexpr unsigned long STRIP_BLOCK_BUF_SIZE
Definition: EFTrackingTransient.h:33
EFTrackingFPGAIntegration::BenchmarkAlg::m_kernelTime
std::atomic< cl_ulong > m_kernelTime
Time for kernel execution.
Definition: BenchmarkAlg.h:102
EFTrackingFPGAIntegration::BenchmarkAlg::m_inputStripClusterKey
SG::ReadHandleKey< xAOD::StripClusterContainer > m_inputStripClusterKey
Key to access input strip clusters.
Definition: BenchmarkAlg.h:64
a
TList * a
Definition: liststreamerinfos.cxx:10
EFTrackingTransient::PixelClusterAuxInput::id
std::vector< long unsigned int > id
Definition: EFTrackingTransient.h:223
h
EFTrackingFPGAIntegration::BenchmarkAlg::m_stripInputTime
std::atomic< cl_ulong > m_stripInputTime
Time for strip input buffer write.
Definition: BenchmarkAlg.h:94
EFTrackingTransient::PixelClusterAuxInput::widthInEta
std::vector< float > widthInEta
Definition: EFTrackingTransient.h:231
EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelClusterKernelName
Gaudi::Property< std::string > m_pixelClusterKernelName
Name of the pixel clustering kernel.
Definition: BenchmarkAlg.h:77
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
EFTrackingTransient::PixelClusterAuxInput::globalPosition
std::vector< float > globalPosition
Definition: EFTrackingTransient.h:227
EFTrackingFPGAIntegration::BenchmarkAlg::runPassThrough
StatusCode runPassThrough(std::vector< uint64_t > &pixelChainOutput, std::vector< uint64_t > &stripChainOutput, const EventContext &ctx) const
Definition: BenchmarkAlg.cxx:278
DEBUG
#define DEBUG
Definition: page_access.h:11
EFTrackingTransient::StripClusterAuxInput::id
std::vector< long unsigned int > id
Definition: EFTrackingTransient.h:211
EFTrackingTransient::StripClusterAuxInput::channelsInPhi
std::vector< int > channelsInPhi
Definition: EFTrackingTransient.h:214
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
EFTrackingTransient::NUM_STRIP_WORD
constexpr unsigned int NUM_STRIP_WORD
Definition: EFTrackingTransient.h:29
EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelClusteringTime
std::atomic< cl_ulong > m_pixelClusteringTime
Time for pixel clustering.
Definition: BenchmarkAlg.h:95
EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelOutputTime
std::atomic< cl_ulong > m_pixelOutputTime
Time for pixel output buffer read.
Definition: BenchmarkAlg.h:100
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthCommonReentrantAlgorithm.cxx:107
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthCommonReentrantAlgorithm.h:114
EFTrackingFPGAIntegration::BenchmarkAlg::m_stripL2GTime
std::atomic< cl_ulong > m_stripL2GTime
Time for strip L2G.
Definition: BenchmarkAlg.h:98
IntegrationBase::m_program
cl::Program m_program
Program object containing the kernel.
Definition: IntegrationBase.h:68
EFTrackingFPGAIntegration::BenchmarkAlg::m_edmPrepTime
std::atomic< cl_ulong > m_edmPrepTime
Time for EDM preparation.
Definition: BenchmarkAlg.h:99
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
EFTrackingTransient::PixelClusterAuxInput::omegaX
std::vector< float > omegaX
Definition: EFTrackingTransient.h:232
EFTrackingTransient::PixelClusterAuxInput::omegaY
std::vector< float > omegaY
Definition: EFTrackingTransient.h:233
ServiceHandle< ICondSvc >
EFTrackingFPGAIntegration::BenchmarkAlg::m_runPassThrough
Gaudi::Property< bool > m_runPassThrough
Run the pass-through kernel.
Definition: BenchmarkAlg.h:89
EFTrackingFPGAIntegration::BenchmarkAlg::runDataPrep
StatusCode runDataPrep(std::vector< uint64_t > &pixelChainOutput, std::vector< uint64_t > &stripChainOutput, const EventContext &ctx) const
Definition: BenchmarkAlg.cxx:339