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

#include <F150KernelTesterAlg.h>

Inheritance diagram for EFTrackingFPGAIntegration::F150KernelTesterAlg:

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::string get_cu_name (const std::string &kernel_name, int cu)
void dumpHexData (std::span< const uint64_t > data, const std::string &dataDescriptor, const EventContext &ctx) const
void dumpHexData (std::span< const uint32_t > data, const std::string &dataDescriptor, const EventContext &ctx) const
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
 Service for timing the algorithm.
ToolHandle< xAODClusterMakerm_xaodClusterMaker
 Tool for creating xAOD containers.
ToolHandle< TestVectorToolm_testVectorTool
 Tool for preparing test vectors.
ToolHandle< FPGADataFormatToolm_FPGADataFormatTool
 Tool for formatting FPGA data.
Gaudi::Property< std::string > m_xclbin {this, "xclbin", "", "xclbin path and name"}
 Path and name of the xclbin file.
Gaudi::Property< bool > m_runSE {this, "RunSlicing", "", "Whether to run slicing engine or not"}
 Whether to run SE or not.
Gaudi::Property< bool > m_runIO {this, "RunInsideOut", "", "Whether to run inside out or not"}
 Whether to run inside out or not.
Gaudi::Property< bool > m_runIOOnSE {this, "RunInsideOutOnSlicingEngine", "", "Whether to run inside out on the output of the slicing engine"}
 Whether to run inside out on the output of slicing engine.
Gaudi::Property< bool > m_runFull150 {this, "RunFullF150", "", "Whether to run Full 150 chain"}
 Whether to run the Full F150 include F100 on hy.
Gaudi::Property< bool > m_outputTextFile {this, "outputTextFile", "", "Whether to output text file"}
 Whether to run SE or not.
SG::ReadHandleKey< FPGATrackSimHitCollectionm_FPGAHitKey {this, "FPGATrackSimHitKey","FPGAHits", "FPGATrackSim hits key"}
SG::ReadHandleKey< FPGATrackSimHitCollectionm_FPGASlicedHitKey {this, "FPGATrackSimHitKey_1st", "FPGAHits_1st_reg34", "FPGATrackSim Hits 1st stage key"}
SG::ReadHandleKey< FPGATrackSimTrackCollectionm_FPGATrackKey {this, "FPGATrackSimTrack1stKey","FPGATracks_1st_reg34","FPGATrackSim Tracks 1st stage key"}
SG::WriteHandleKey< std::vector< uint64_t > > m_FPGATrackOutput {this, "FPGAOutputTrackKey", "FPGATrackOutput", "Track output from FPGA format"}
ToolHandle< OutputConversionToolm_outputConversionTool {this, "OutputConversionTool", "OutputConversionTool", "tool for output conversion"}
Gaudi::Property< std::string > m_slicingEngineInputName {this, "SlicingEngineInputName", "", "Name of the slicing engine input kernel"}
Gaudi::Property< std::string > m_slicingEngineOutputName {this, "SlicingEngineOutputName", "", "Name of the slicing engine output kernel"}
Gaudi::Property< std::string > m_insideOutInputName {this, "InsideOutInputName", "", "Name of the inside out input kernel"}
Gaudi::Property< std::string > m_insideOutOutputName {this, "InsideOutOutputName", "", "Name of the inside out output kernel"}
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::atomic< cl_ulong > m_IO_kernelTime {0}
 Time for kernel execution.
std::atomic< cl_ulong > m_SE_kernelTime {0}
 Sum for the average time of the kernel execution.
std::atomic< ulonglong > m_numEvents {0}
 Number of events for the average time of the kernel execution.
xrt::device m_xrt_accelerator
cl::Event m_slicingEngineInputEndEvent ATLAS_THREAD_SAFE
cl::Event m_slicingEngineOutputEndEvent ATLAS_THREAD_SAFE
cl::Event m_insideOutEndEvent ATLAS_THREAD_SAFE
cl::Kernel m_slicingEngineInput ATLAS_THREAD_SAFE
cl::Kernel m_slicingEngineOutput ATLAS_THREAD_SAFE
cl::Kernel m_insideOutInput ATLAS_THREAD_SAFE
cl::Kernel m_insideOutOutput ATLAS_THREAD_SAFE
cl::Buffer m_slicingEngineInputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_slicingEngineOutputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_insideOutInputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_insideOutOutputBuffer ATLAS_THREAD_SAFE
cl::Kernel m_pixelClusteringKernel ATLAS_THREAD_SAFE
cl::Kernel m_stripClusteringKernel ATLAS_THREAD_SAFE
cl::Kernel m_stripL2GKernel ATLAS_THREAD_SAFE
cl::Kernel m_pixelEdmPrepKernel ATLAS_THREAD_SAFE
cl::Kernel m_stripEdmPrepKernel ATLAS_THREAD_SAFE
cl::Buffer m_pixelClusterInputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_stripClusterInputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_pixelClusterOutputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_stripClusterOutputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_pixelClusterEDMOutputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_stripClusterEDMOutputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_stripL2GInputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_stripL2GEDMInputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_stripL2GOutputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_stripL2GEDMOutputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_edmPixelInputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_edmStripInputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_edmPixelOutputBuffer ATLAS_THREAD_SAFE
cl::Buffer m_edmStripOutputBuffer ATLAS_THREAD_SAFE
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"}
cl::CommandQueue m_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

Definition at line 40 of file F150KernelTesterAlg.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.

◆ dumpHexData() [1/2]

void EFTrackingFPGAIntegration::F150KernelTesterAlg::dumpHexData ( std::span< const uint32_t > data,
const std::string & dataDescriptor,
const EventContext & ctx ) const
private

Definition at line 45 of file F150KernelTesterAlg.cxx.

45 {
46
47 if(!m_outputTextFile) return;
48 auto withEvt = [&](const std::string& fname) {
49 const auto evt = ctx.eventID().event_number(); // get current event number
50 const auto dot = fname.rfind('.');
51 if (dot == std::string::npos) {
52 return fname + "_" + std::to_string(evt);
53 }
54 return fname.substr(0, dot) + "_" + std::to_string(evt) + fname.substr(dot);
55 };
56
57
58 ATH_MSG_DEBUG("STARTING " << dataDescriptor << " words:");
59 std::ofstream outputFile(withEvt(dataDescriptor));
60
61 for (uint64_t d : data) {
62 outputFile << std::hex << std::setw(8) << std::setfill('0') << d << '\n';
63 }
64
65 // Write different data types
66 outputFile.close();
67 }
#define ATH_MSG_DEBUG(x)
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
Gaudi::Property< bool > m_outputTextFile
Whether to run SE or not.
dot(G, fn, nodesToHighlight=[])
Definition dot.py:5

◆ dumpHexData() [2/2]

void EFTrackingFPGAIntegration::F150KernelTesterAlg::dumpHexData ( std::span< const uint64_t > data,
const std::string & dataDescriptor,
const EventContext & ctx ) const
private

Definition at line 21 of file F150KernelTesterAlg.cxx.

21 {
22
23 if(!m_outputTextFile) return;
24 auto withEvt = [&](const std::string& fname) {
25 const auto evt = ctx.eventID().event_number(); // get current event number
26 const auto dot = fname.rfind('.');
27 if (dot == std::string::npos) {
28 return fname + "_" + std::to_string(evt);
29 }
30 return fname.substr(0, dot) + "_" + std::to_string(evt) + fname.substr(dot);
31 };
32
33
34 ATH_MSG_DEBUG("STARTING " << dataDescriptor << " words:");
35 std::ofstream outputFile(withEvt(dataDescriptor));
36
37 for (uint64_t d : data) {
38 outputFile << std::hex << std::setw(16) << std::setfill('0') << d << '\n';
39 }
40
41 // Write different data types
42 outputFile.close();
43 }

◆ 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::F150KernelTesterAlg::execute ( const EventContext & ctx) const
finaloverridevirtual

Should be overriden by derived classes to perform meaningful work.

Reimplemented from IntegrationBase.

Definition at line 146 of file F150KernelTesterAlg.cxx.

147 {
148 ATH_MSG_DEBUG("Executing F150KernelTesterAlg");
149
150
151 SG::ReadHandle<FPGATrackSimTrackCollection> outTrackCollection(m_FPGATrackKey, ctx);
152 // if not running the full IO, use the simulation to write the output to storegate
153 if(!m_runIOOnSE && !m_runIO && !m_runFull150)
154 {
155 SG::WriteHandle<std::vector<uint64_t>> FPGATrackOutput(m_FPGATrackOutput, ctx);
156 auto outputVec = std::make_unique<std::vector<uint64_t>>();
157
158 ATH_CHECK(m_FPGADataFormatTool->convertFPGATracksToFPGADataFormat(outTrackCollection.cptr(), *outputVec, ctx));
159 // Now record the filled vector
160 ATH_CHECK(FPGATrackOutput.record(std::move(outputVec)));
161 }
162
163 // Prepare the inputs for testing
164 ATH_MSG_DEBUG("Accessing SE In data.");
165 std::vector<uint64_t> pixelDataIN;
166 std::vector<uint64_t> stripDataIN;
167 SG::ReadHandle<FPGATrackSimHitCollection> hitCollectionHandle(m_FPGAHitKey, ctx);
168 ATH_CHECK(m_FPGADataFormatTool->convertFPGAHitsToFPGADataFormat(hitCollectionHandle.cptr(), true, false, pixelDataIN, ctx));
169 ATH_CHECK(m_FPGADataFormatTool->convertFPGAHitsToFPGADataFormat(hitCollectionHandle.cptr(), false, true, stripDataIN, ctx));
170
171 int padLength = 8;
172 int inputIOLength = pixelDataIN.size();
173 auto remainder = inputIOLength % padLength;
174 if (remainder != 0) {
175 size_t to_add = padLength - remainder;
176 pixelDataIN.insert(pixelDataIN.end(), to_add, 0); // append zeros
177 }
178
179 dumpHexData(pixelDataIN, "FPGATrackSim_slicingIn_pixel.txt", ctx);
180 dumpHexData(stripDataIN, "FPGATrackSim_slicingIn_strip.txt", ctx);
181
182 ATH_MSG_DEBUG("Accessing SE Out data.");
183 std::vector<uint64_t> dataPixelOut;
184 std::vector<uint64_t> dataStripOut;
185 SG::ReadHandle<FPGATrackSimHitCollection> outhitCollectionHandle(m_FPGASlicedHitKey, ctx);
186 ATH_CHECK(m_FPGADataFormatTool->convertFPGASliceToFPGADataFormat(outhitCollectionHandle.cptr(), true, false, dataPixelOut, ctx));
187 ATH_CHECK(m_FPGADataFormatTool->convertFPGASliceToFPGADataFormat(outhitCollectionHandle.cptr(), false, true, dataStripOut, ctx));
188 dumpHexData(dataPixelOut, "FPGATrackSim_slicingOut_pixel.txt", ctx);
189 dumpHexData(dataStripOut, "FPGATrackSim_slicingOut_strip.txt", ctx);
190
191 ATH_MSG_DEBUG("Accessing SE Out data.");
192 std::vector<uint64_t> dataInsideOut;
193 ATH_CHECK(m_FPGADataFormatTool->convertFPGATracksToFPGADataFormat(outTrackCollection.cptr(), dataInsideOut, ctx));
194 dumpHexData(dataInsideOut, "FPGATrackSim_insideOut.txt", ctx);
195
196
197 cl_int err = CL_SUCCESS;
198
199 // increment the event if there is data in this event
200 if(pixelDataIN.size() > 6) m_numEvents++;
201
202 // initialize buffers
203 m_pixelClusterInputBuffer = cl::Buffer(m_context, CL_MEM_READ_ONLY, EFTrackingTransient::PIXEL_CONTAINER_INPUT_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
204 m_stripClusterInputBuffer = cl::Buffer(m_context, CL_MEM_READ_ONLY, EFTrackingTransient::STRIP_CONTAINER_INPUT_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
205
206 // Clustering
207 m_pixelClusterOutputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::PIXEL_BLOCK_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
208 m_stripClusterOutputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
209 m_pixelClusterEDMOutputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE,EFTrackingTransient::PIXEL_BLOCK_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
210 m_stripClusterEDMOutputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
211
212 // L2G
213 m_stripL2GInputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
214 m_stripL2GEDMInputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
215
216 m_stripL2GOutputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
217 m_stripL2GEDMOutputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
218
219 // EDMPrep
220 m_edmPixelInputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::PIXEL_BLOCK_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
221 m_edmStripInputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
222 m_edmPixelOutputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::PIXEL_CONTAINER_BUF_SIZE * sizeof(uint32_t), nullptr, &err);
223 m_edmStripOutputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::STRIP_CONTAINER_BUF_SIZE * sizeof(uint32_t), nullptr, &err);
224
225
226 if(m_runFull150) m_slicingEngineInputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::PIXEL_BLOCK_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
227 else m_slicingEngineInputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, pixelDataIN.size() * sizeof(uint64_t), nullptr, &err);
228 m_slicingEngineOutputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::TRACK_CONTAINER_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
229
230 if(m_runIOOnSE || m_runFull150) m_insideOutInputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::TRACK_CONTAINER_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
231 else m_insideOutInputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, dataPixelOut.size() * sizeof(uint64_t), nullptr, &err);
232 m_insideOutOutputBuffer = cl::Buffer(m_context, CL_MEM_READ_WRITE, EFTrackingTransient::TRACK_CONTAINER_BUF_SIZE * sizeof(uint64_t), nullptr, &err);
233
234
235 if (m_runSE) {
236 // Events (write → kSEInput → kSEOutput → read)
237 cl::Event evtSEWriteIn;
238 cl::Event evtSEKInputDone;
239 cl::Event evtSEKOutputDone;
240 cl::Event evtSEReadOut;
241
242 m_slicingEngineInput.setArg(0, m_slicingEngineInputBuffer);
243 m_slicingEngineInput.setArg(2, static_cast<unsigned long long>(inputIOLength));
244 ATH_MSG_DEBUG("Setting NWords:" << static_cast<unsigned long long>(inputIOLength)<<" with size: "<<pixelDataIN.size());
245
246 m_slicingEngineOutput.setArg(1, m_slicingEngineOutputBuffer);
247
248 ATH_MSG_DEBUG("Transferring SE data");
249 m_queue.enqueueWriteBuffer(m_slicingEngineInputBuffer, CL_FALSE, 0, pixelDataIN.size() * sizeof(uint64_t), pixelDataIN.data(), nullptr, &evtSEWriteIn);
250 m_queue.finish();
251
252 // Execute
253 ATH_MSG_DEBUG("Executing SE Kernel");
254 std::vector<cl::Event> waitAfterSEWrite{evtSEWriteIn};
255 m_queue.enqueueTask(m_slicingEngineInput, &waitAfterSEWrite, &evtSEKInputDone);
256 m_queue.finish();
257 ATH_MSG_DEBUG("Executing SE output Kernel");
258 m_queue.enqueueTask(m_slicingEngineOutput, nullptr, &evtSEKOutputDone);
259 m_queue.finish();
260
261 // Read
262 ATH_MSG_DEBUG("Reading output data from kernel");
263 std::vector<uint64_t> out_data(EFTrackingTransient::TRACK_CONTAINER_BUF_SIZE, 0);
264 std::vector<cl::Event> waitForSERead{evtSEKOutputDone};
265 m_queue.enqueueReadBuffer(m_slicingEngineOutputBuffer, /*blocking*/ CL_FALSE, 0, EFTrackingTransient::TRACK_CONTAINER_BUF_SIZE * sizeof(uint64_t) ,out_data.data(),&waitForSERead, &evtSEReadOut);
266
267 // Optional explicit sync (blocking read already waits)
268 cl::Event::waitForEvents({evtSEReadOut});
269
270 dumpHexData(out_data, "HW_slicingOut_pixel.txt", ctx);
271
272 m_SE_kernelTime += evtSEKOutputDone.getProfilingInfo<CL_PROFILING_COMMAND_END>() - evtSEKInputDone.getProfilingInfo<CL_PROFILING_COMMAND_START>();
273
274 }
275 if (m_runIO)
276 {
277 cl::Event evtWriteIn;
278 cl::Event evtKInputDone;
279 cl::Event evtKOutputDone;
280 cl::Event evtReadOut;
281
282 ATH_MSG_DEBUG("Setting IO args");
283 m_insideOutInput.setArg(0, m_insideOutInputBuffer);
284 m_insideOutOutput.setArg(0, m_insideOutOutputBuffer);
285
286 ATH_MSG_DEBUG("Loading input data to IO input kernel");
287 m_queue.enqueueWriteBuffer(m_insideOutInputBuffer, CL_TRUE, 0, dataPixelOut.size() * sizeof(uint64_t), dataPixelOut.data(), nullptr, &evtWriteIn);
288 m_queue.finish();
289 // Execute
290 ATH_MSG_DEBUG("Executing IO Kernel");
291 std::vector<cl::Event> waitAfterWrite{evtWriteIn};
292 m_queue.enqueueTask(m_insideOutInput, &waitAfterWrite, &evtKInputDone);
293 m_queue.enqueueTask(m_insideOutOutput, nullptr, &evtKOutputDone);
294 m_queue.finish();
295
296 // Read
297 ATH_MSG_DEBUG("Reading output data from kernel");
298
299 // output handles
300 SG::WriteHandle<std::vector<uint64_t>> FPGATrackOutput(m_FPGATrackOutput, ctx);
301 ATH_CHECK(FPGATrackOutput.record(std::make_unique<std::vector<uint64_t> >(EFTrackingTransient::TRACK_CONTAINER_BUF_SIZE, 0)));
302
303 std::vector<cl::Event> waitForRead{evtKOutputDone};
304 m_queue.enqueueReadBuffer( m_insideOutOutputBuffer, CL_FALSE, 0, sizeof(uint64_t) * (*FPGATrackOutput).size(), (*FPGATrackOutput).data(), &waitForRead, &evtReadOut);
305
306 // Ensure completion (optional since read is blocking, but explicit is fine)
307 cl::Event::waitForEvents({evtReadOut});
308 dumpHexData((*FPGATrackOutput), "HW_insideOut.txt", ctx);
309
310 m_IO_kernelTime += evtKOutputDone.getProfilingInfo<CL_PROFILING_COMMAND_END>() - evtKInputDone.getProfilingInfo<CL_PROFILING_COMMAND_START>();
311 }
312
313 if (m_runIOOnSE)
314 {
315 cl::Event evtSEWriteIn;
316 cl::Event evtSEKInputDone;
317 cl::Event evtSEKOutputDone;
318
319 cl::Event evtBufferTransfer;
320
321
322 cl::Event evtKInputDone;
323 cl::Event evtKOutputDone;
324 cl::Event evtReadOut;
325
326 ATH_MSG_DEBUG("Allocating SE buffers");
327 const size_t pixel_size_bytesIN = pixelDataIN.size() * sizeof(uint64_t);
328
329 m_slicingEngineInput.setArg(0, m_slicingEngineInputBuffer);
330 m_slicingEngineInput.setArg(2, static_cast<unsigned long long>(pixelDataIN.size()));
331
332 m_slicingEngineOutput.setArg(1, m_slicingEngineOutputBuffer);
333
334 ATH_MSG_DEBUG("Setting IO args");
335 m_insideOutInput.setArg(0, m_insideOutInputBuffer);
336 m_insideOutOutput.setArg(0, m_insideOutOutputBuffer);
337 m_queue.finish();
338
339 ATH_MSG_DEBUG("Transferring SE data");
340 m_queue.enqueueWriteBuffer(m_slicingEngineInputBuffer, CL_FALSE, 0, pixel_size_bytesIN, pixelDataIN.data(), nullptr, &evtSEWriteIn);
341 m_queue.finish();
342 // Execute
343 ATH_MSG_DEBUG("Executing SE Kernel");
344 std::vector<cl::Event> waitAfterSEWrite{evtSEWriteIn};
345 m_queue.enqueueTask(m_slicingEngineInput, &waitAfterSEWrite, &evtSEKInputDone);
346 m_queue.enqueueTask(m_slicingEngineOutput, nullptr, &evtSEKOutputDone);
347 m_queue.finish();
348 // Execute
349 ATH_MSG_DEBUG("Executing IO Kernel");
350 std::vector<cl::Event> waitAfterSE{evtSEKOutputDone};
351
352 m_queue.enqueueCopyBuffer(m_slicingEngineOutputBuffer, m_insideOutInputBuffer, 0, 0, EFTrackingTransient::TRACK_CONTAINER_BUF_SIZE * sizeof(uint64_t), &waitAfterSE, &evtBufferTransfer);
353
354 std::vector<cl::Event> waitAfterTransfer{evtBufferTransfer};
355 m_queue.enqueueTask(m_insideOutInput, &waitAfterTransfer, &evtKInputDone);
356 m_queue.enqueueTask(m_insideOutOutput, NULL, &evtKOutputDone);
357 m_queue.finish();
358 // Read
359 ATH_MSG_DEBUG("Reading output data from kernel");
360 std::vector<cl::Event> waitForRead{evtKOutputDone};
361
362 // output handles
363 SG::WriteHandle<std::vector<uint64_t>> FPGATrackOutput(m_FPGATrackOutput, ctx);
364 ATH_CHECK(FPGATrackOutput.record(std::make_unique<std::vector<uint64_t> >(EFTrackingTransient::TRACK_CONTAINER_BUF_SIZE, 0)));
365
366 m_queue.enqueueReadBuffer( m_insideOutOutputBuffer, CL_FALSE, 0, sizeof(uint64_t) * (*FPGATrackOutput).size(), (*FPGATrackOutput).data(), &waitForRead, &evtReadOut);
367
368 // Ensure completion (optional since read is blocking, but explicit is fine)
369 cl::Event::waitForEvents({evtReadOut});
370 dumpHexData((*FPGATrackOutput), "HW_insideOut.txt", ctx);
371
372 m_SE_kernelTime += evtSEKOutputDone.getProfilingInfo<CL_PROFILING_COMMAND_END>() - evtSEKInputDone.getProfilingInfo<CL_PROFILING_COMMAND_START>();
373 m_IO_kernelTime += evtKOutputDone.getProfilingInfo<CL_PROFILING_COMMAND_END>() - evtKInputDone.getProfilingInfo<CL_PROFILING_COMMAND_START>();
374 }
375
376 if(m_runFull150)
377 {
378 // === INPUT FETCH ===
379 auto pixelInput = SG::get(m_FPGAPixelRDO, ctx);
380 auto stripInput = SG::get(m_FPGAStripRDO, ctx);
381
382 const int* pixelInputSize{nullptr}, *stripInputSize{nullptr};
383 ATH_CHECK(SG::get(pixelInputSize, m_FPGAPixelRDOSize, ctx));
384 ATH_CHECK(SG::get(stripInputSize, m_FPGAStripRDOSize, ctx));
385
386 // === KERNEL ARG SETUP ===
387 m_pixelClusteringKernel.setArg(0, m_pixelClusterInputBuffer);
388 m_pixelClusteringKernel.setArg(1, m_pixelClusterOutputBuffer);
389 m_pixelClusteringKernel.setArg(2, m_pixelClusterEDMOutputBuffer);
390
391 m_stripClusteringKernel.setArg(0, m_stripClusterInputBuffer);
392 m_stripClusteringKernel.setArg(1, m_stripClusterOutputBuffer);
393 m_stripClusteringKernel.setArg(2, m_stripClusterEDMOutputBuffer);
394 m_stripClusteringKernel.setArg(3, static_cast<unsigned int>(*stripInputSize));
395
396 m_stripL2GKernel.setArg(0, m_stripL2GInputBuffer);
397 m_stripL2GKernel.setArg(1, m_stripL2GEDMInputBuffer);
398 m_stripL2GKernel.setArg(2, m_stripL2GOutputBuffer);
399 m_stripL2GKernel.setArg(3, m_stripL2GEDMOutputBuffer);
400
401 m_pixelEdmPrepKernel.setArg(0, m_edmPixelInputBuffer);
402 m_pixelEdmPrepKernel.setArg(1, m_edmPixelOutputBuffer);
403 m_stripEdmPrepKernel.setArg(0, m_edmStripInputBuffer);
404 m_stripEdmPrepKernel.setArg(1, m_edmStripOutputBuffer);
405
406 // === HOST->DEVICE INPUT WRITES ===
407 cl::Event evt_pixel_input_write, evt_strip_input_write;
408
409 m_queue.enqueueWriteBuffer(m_pixelClusterInputBuffer, CL_FALSE, 0, sizeof(uint64_t) * (*pixelInput).size(), (*pixelInput).data(), nullptr, &evt_pixel_input_write);
410 m_queue.enqueueWriteBuffer(m_stripClusterInputBuffer, CL_FALSE, 0, sizeof(uint64_t) * (*stripInput).size(), (*stripInput).data(), nullptr, &evt_strip_input_write);
411
412 std::vector<cl::Event> evts_pixel_input_write{evt_pixel_input_write};
413 std::vector<cl::Event> evts_strip_input_write{evt_strip_input_write};
414
415 // === CLUSTERING KERNELS ===
416 cl::Event evt_pixel_clustering_done, evt_strip_clustering_done;
417
418 m_queue.enqueueTask(m_pixelClusteringKernel, &evts_pixel_input_write, &evt_pixel_clustering_done);
419 m_queue.enqueueTask(m_stripClusteringKernel, &evts_strip_input_write, &evt_strip_clustering_done);
420
421 // === PCOPY STRIP CLUSTERS -> L2G INPUTS ===
422 cl::Event evt_strip_l2g_input_copy_clusters, evt_strip_l2g_input_copy_edm;
423 std::vector<cl::Event> evts_strip_clustering_done{evt_strip_clustering_done};
424
425 m_queue.enqueueCopyBuffer(m_stripClusterOutputBuffer, m_stripL2GInputBuffer, 0, 0, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), &evts_strip_clustering_done, &evt_strip_l2g_input_copy_clusters);
426 m_queue.enqueueCopyBuffer(m_stripClusterEDMOutputBuffer, m_stripL2GEDMInputBuffer, 0, 0, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), &evts_strip_clustering_done, &evt_strip_l2g_input_copy_edm);
427
428 std::vector<cl::Event> evts_strip_l2g_input_copies{evt_strip_l2g_input_copy_clusters, evt_strip_l2g_input_copy_edm};
429
430 // === STRIP L2G KERNEL ===
431 cl::Event evt_strip_l2g_done;
432 m_queue.enqueueTask(m_stripL2GKernel, &evts_strip_l2g_input_copies, &evt_strip_l2g_done);
433
434 // === PHASE: COPY EDM INPUTS (PIXEL FROM CLUSTERING, STRIP FROM L2G) ===
435 cl::Event evt_pixel_edm_input_copy, evt_strip_edm_input_copy;
436 std::vector<cl::Event> evts_pixel_clustering_done{evt_pixel_clustering_done};
437 std::vector<cl::Event> evts_strip_l2g_done{evt_strip_l2g_done};
438
439 m_queue.enqueueCopyBuffer(m_pixelClusterEDMOutputBuffer, m_edmPixelInputBuffer, 0, 0, EFTrackingTransient::PIXEL_BLOCK_BUF_SIZE * sizeof(uint64_t), &evts_pixel_clustering_done, &evt_pixel_edm_input_copy);
440 m_queue.enqueueCopyBuffer(m_stripL2GEDMOutputBuffer, m_edmStripInputBuffer, 0, 0, EFTrackingTransient::STRIP_BLOCK_BUF_SIZE * sizeof(uint64_t), &evts_strip_l2g_done, &evt_strip_edm_input_copy);
441
442 // === PHASE: EDM PREP KERNELS ===
443 cl::Event evt_pixel_edm_prep_done, evt_strip_edm_prep_done;
444 std::vector<cl::Event> evts_pixel_edm_input_copied{evt_pixel_edm_input_copy};
445 std::vector<cl::Event> evts_strip_edm_input_copied{evt_strip_edm_input_copy};
446
447 m_queue.enqueueTask(m_pixelEdmPrepKernel, &evts_pixel_edm_input_copied, &evt_pixel_edm_prep_done);
448 m_queue.enqueueTask(m_stripEdmPrepKernel, &evts_strip_edm_input_copied, &evt_strip_edm_prep_done);
449
450 // === PHASE: EDM READBACKS ===
451 SG::WriteHandle<std::vector<uint32_t>> FPGAPixelOutput(m_FPGAPixelOutput, ctx);
452 ATH_CHECK(FPGAPixelOutput.record(std::make_unique<std::vector<uint32_t>>(EFTrackingTransient::PIXEL_CONTAINER_BUF_SIZE, 0)));
453
454 SG::WriteHandle<std::vector<uint32_t>> FPGAStripOutput(m_FPGAStripOutput, ctx);
455 ATH_CHECK(FPGAStripOutput.record(std::make_unique<std::vector<uint32_t>>(EFTrackingTransient::STRIP_CONTAINER_BUF_SIZE, 0)));
456
457 cl::Event evt_pixel_edm_read_done, evt_strip_edm_read_done;
458 std::vector<cl::Event> evts_pixel_edm_prep_done{evt_pixel_edm_prep_done};
459 std::vector<cl::Event> evts_strip_edm_prep_done{evt_strip_edm_prep_done};
460
461 m_queue.enqueueReadBuffer(m_edmPixelOutputBuffer, CL_FALSE, 0, sizeof(uint32_t) * (*FPGAPixelOutput).size(), (*FPGAPixelOutput).data(), &evts_pixel_edm_prep_done, &evt_pixel_edm_read_done);
462 m_queue.enqueueReadBuffer(m_edmStripOutputBuffer, CL_FALSE, 0, sizeof(uint32_t) * (*FPGAStripOutput).size(), (*FPGAStripOutput).data(), &evts_strip_edm_prep_done, &evt_strip_edm_read_done);
463
464 cl::Event::waitForEvents(std::vector<cl::Event>{evt_pixel_edm_read_done, evt_strip_edm_read_done});
465
466 // === PHASE: POST-EDM GUARDS ===
467 if (pixelInput->size() == 6) (*FPGAPixelOutput)[0] = 0;
468 if (stripInput->size() == 6) (*FPGAStripOutput)[0] = 0;
469
470 m_queue.finish();
471 ATH_MSG_DEBUG("Done F100");
472
473 // === PHASE: PIXEL CLUSTER RAW READBACK FOR SE ===
474 cl::Event evt_pixel_cluster_output_read;
475 std::vector<uint64_t> pixelClusterOut(EFTrackingTransient::PIXEL_BLOCK_BUF_SIZE, 0);
476
477 m_queue.enqueueReadBuffer(m_pixelClusterOutputBuffer, CL_FALSE, 0, sizeof(uint64_t) * pixelClusterOut.size(), pixelClusterOut.data(), &evts_pixel_clustering_done, &evt_pixel_cluster_output_read);
478 m_queue.finish();
479
480 // === PHASE: FOOTER SCAN & SANITIZE ===
481 int nWords = static_cast<int>(pixelClusterOut.size()) - 1;
482 for (; nWords >= 0; nWords--)
483 {
484 if (pixelClusterOut[nWords] == 0xcd00000000000000) break;
485 }
486 // If footer not found, bail out safely
487 if (nWords < 0)
488 {
489 ATH_MSG_ERROR("Footer 0xcd00000000000000 not found in pixelClusterOut; cannot determine nWords"); return StatusCode::FAILURE;
490 }
491
492 // We have 3 footer words, account for that
493 if (nWords > 0) nWords += 3;
494
495 //clean the next 8 words to account for the input buffer read
496 for (int i = 0; i < 8 && (nWords + i) < static_cast<int>(pixelClusterOut.size()); i++)
497 {
498 pixelClusterOut[nWords + i] = 0;
499 }
500 ATH_MSG_DEBUG("Got NWords:" << nWords);
501
502 // === KERNEL ARG SETUP ===
503 m_slicingEngineInput.setArg(0, m_slicingEngineInputBuffer);
504 m_slicingEngineInput.setArg(2, static_cast<unsigned long long>(nWords));
505 m_slicingEngineOutput.setArg(1, m_slicingEngineOutputBuffer);
506
507 m_insideOutInput.setArg(0, m_insideOutInputBuffer);
508 m_insideOutOutput.setArg(0, m_insideOutOutputBuffer);
509
510 // === PHASE: WRITE BUFFER FOR SE ===
511 cl::Event evt_se_input_write;
512
513 m_queue.enqueueWriteBuffer(m_slicingEngineInputBuffer, CL_FALSE, 0, pixelClusterOut.size() * sizeof(uint64_t), pixelClusterOut.data(), nullptr, &evt_se_input_write);
514 m_queue.finish();
515
516
517 // === PHASE: SE RUNNING ===
518 cl::Event evt_se_kernel_input_done, evt_se_kernel_output_done;
519 std::vector<cl::Event> evts_after_se_input_write{evt_se_input_write};
520
521 m_queue.enqueueTask(m_slicingEngineInput, &evts_after_se_input_write, &evt_se_kernel_input_done);
522 m_queue.enqueueTask(m_slicingEngineOutput, nullptr, &evt_se_kernel_output_done);
523 m_queue.finish();
524
525 // === PHASE: SE->IO COPY ===
526 cl::Event evt_io_input_transfer;
527 std::vector<cl::Event> evts_after_se_output_done{evt_se_kernel_output_done};
528
529 m_queue.enqueueCopyBuffer(m_slicingEngineOutputBuffer, m_insideOutInputBuffer, 0, 0, EFTrackingTransient::TRACK_CONTAINER_BUF_SIZE * sizeof(uint64_t), &evts_after_se_output_done, &evt_io_input_transfer);
530 m_queue.finish();
531
532 // === PHASE: IO KERNELS ===
533 cl::Event evt_io_kernel_input_done, evt_io_kernel_output_done;
534 std::vector<cl::Event> evts_after_io_input_transfer{evt_io_input_transfer};
535
536 m_queue.enqueueTask(m_insideOutInput, &evts_after_io_input_transfer, &evt_io_kernel_input_done);
537 m_queue.enqueueTask(m_insideOutOutput, nullptr, &evt_io_kernel_output_done);
538 m_queue.finish();
539
540 // === PHASE: IO READBACK ===
541 SG::WriteHandle<std::vector<uint64_t>> FPGATrackOutput(m_FPGATrackOutput, ctx);
542 ATH_CHECK(FPGATrackOutput.record(std::make_unique<std::vector<uint64_t>>(EFTrackingTransient::TRACK_CONTAINER_BUF_SIZE, 0)));
543
544 cl::Event evt_io_output_read;
545 std::vector<cl::Event> evts_before_insideout_read{evt_io_kernel_output_done};
546 m_queue.enqueueReadBuffer(m_insideOutOutputBuffer, CL_FALSE, 0, sizeof(uint64_t) * (*FPGATrackOutput).size(), (*FPGATrackOutput).data(), &evts_before_insideout_read, &evt_io_output_read);
547
548 cl::Event::waitForEvents(std::vector<cl::Event>{evt_io_output_read});
549 dumpHexData((*FPGATrackOutput), "HW_insideOut.txt", ctx);
550
551 m_queue.finish();
552
553 // === PHASE: PROFILING ACCUMULATION ===
554 m_SE_kernelTime += evt_se_kernel_output_done.getProfilingInfo<CL_PROFILING_COMMAND_END>() - evt_se_kernel_input_done.getProfilingInfo<CL_PROFILING_COMMAND_START>();
555 m_IO_kernelTime += evt_io_kernel_output_done.getProfilingInfo<CL_PROFILING_COMMAND_END>() - evt_io_kernel_input_done.getProfilingInfo<CL_PROFILING_COMMAND_START>();
556
557
558 }
559 return StatusCode::SUCCESS;
560 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
Gaudi::Property< bool > m_runIO
Whether to run inside out or not.
SG::WriteHandleKey< std::vector< uint32_t > > m_FPGAPixelOutput
ToolHandle< FPGADataFormatTool > m_FPGADataFormatTool
Tool for formatting FPGA data.
SG::ReadHandleKey< FPGATrackSimHitCollection > m_FPGASlicedHitKey
SG::ReadHandleKey< std::vector< uint64_t > > m_FPGAStripRDO
SG::WriteHandleKey< std::vector< uint64_t > > m_FPGATrackOutput
std::atomic< cl_ulong > m_IO_kernelTime
Time for kernel execution.
Gaudi::Property< bool > m_runFull150
Whether to run the Full F150 include F100 on hy.
std::atomic< cl_ulong > m_SE_kernelTime
Sum for the average time of the kernel execution.
std::atomic< ulonglong > m_numEvents
Number of events for the average time of the kernel execution.
SG::ReadHandleKey< FPGATrackSimTrackCollection > m_FPGATrackKey
SG::ReadHandleKey< FPGATrackSimHitCollection > m_FPGAHitKey
Gaudi::Property< bool > m_runIOOnSE
Whether to run inside out on the output of slicing engine.
Gaudi::Property< bool > m_runSE
Whether to run SE or not.
void dumpHexData(std::span< const uint64_t > data, const std::string &dataDescriptor, const EventContext &ctx) const
SG::WriteHandleKey< std::vector< uint32_t > > m_FPGAStripOutput
SG::ReadHandleKey< std::vector< uint64_t > > m_FPGAPixelRDO
cl::Context m_context
Context object for the application.
std::vector< std::string > remainder(const std::vector< std::string > &v1, const std::vector< std::string > &v2)
constexpr unsigned long PIXEL_CONTAINER_INPUT_BUF_SIZE
constexpr uint32_t STRIP_CONTAINER_BUF_SIZE
constexpr unsigned long STRIP_CONTAINER_INPUT_BUF_SIZE
constexpr uint32_t STRIP_BLOCK_BUF_SIZE
constexpr uint32_t PIXEL_BLOCK_BUF_SIZE
constexpr unsigned long TRACK_CONTAINER_BUF_SIZE
constexpr uint32_t PIXEL_CONTAINER_BUF_SIZE
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::F150KernelTesterAlg::finalize ( )
finaloverridevirtual

Definition at line 562 of file F150KernelTesterAlg.cxx.

563 {
564 ATH_MSG_INFO("Finalizing F150KernelTesterAlg");
565 ATH_MSG_INFO("Number of events: " << m_numEvents);
566
567 if(m_numEvents > 0){
568 ATH_MSG_INFO("Inside out ave time: " << m_IO_kernelTime / m_numEvents / 1e6 << " ms");
569 ATH_MSG_INFO("Slicing Engine ave time: " << m_SE_kernelTime / m_numEvents / 1e6 << " ms");
570 }
571
572 return StatusCode::SUCCESS;
573 }
#define ATH_MSG_INFO(x)

◆ get_cu_name()

std::string EFTrackingFPGAIntegration::F150KernelTesterAlg::get_cu_name ( const std::string & kernel_name,
int cu )
private

Definition at line 15 of file F150KernelTesterAlg.cxx.

15 {
16 std::string full_cu_name = kernel_name + ":{" + kernel_name + "_" + std::to_string(cu) + "}";
17 ATH_MSG_DEBUG("LOADING " + full_cu_name);
18 return full_cu_name;
19 }

◆ initialize()

StatusCode EFTrackingFPGAIntegration::F150KernelTesterAlg::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 70 of file F150KernelTesterAlg.cxx.

71 {
72 ATH_MSG_INFO("Running on the FPGA accelerator");
73 ATH_MSG_INFO("Testing Slicing Engine: " + m_runSE);
74 ATH_MSG_INFO("Testing Inside Out: " + m_runIO);
75 ATH_MSG_INFO("Testing Inside Out on Slicing Engine Output: " + m_runIOOnSE);
76
77 ATH_CHECK(m_chronoSvc.retrieve());
78
79 {
80 Athena::Chrono chrono("Platform and device initialize", m_chronoSvc.get());
82 }
83
84 {
85 Athena::Chrono chrono("CL::loadProgram", m_chronoSvc.get());
86 ATH_MSG_INFO("Loading Program: " + m_xclbin);
88 }
89
90 cl_int err = CL_SUCCESS;
91
92 int cu = 1;
93
94
95 // Pixel clustering
96 m_pixelClusteringKernel = cl::Kernel(m_program, get_cu_name(m_pixelClusterKernelName, cu).c_str(), &err);
97
98 // Strip clustering
99 m_stripClusteringKernel = cl::Kernel(m_program, get_cu_name(m_stripClusterKernelName, cu).c_str(), &err);
100
101 // Strip L2G
102 m_stripL2GKernel = cl::Kernel(m_program, get_cu_name(m_stripL2GKernelName, cu).c_str(), &err);
103
104 // EDM prep
105 m_pixelEdmPrepKernel = cl::Kernel(m_program, get_cu_name(m_pixelEdmKernelName, cu).c_str(), &err);
106 m_stripEdmPrepKernel = cl::Kernel(m_program, get_cu_name(m_stripEdmKernelName, cu).c_str(), &err);
107
108 // Slicing
109 m_slicingEngineInput = cl::Kernel(m_program, get_cu_name(m_slicingEngineInputName, cu).c_str(), &err);
110 m_slicingEngineOutput = cl::Kernel(m_program, get_cu_name(m_slicingEngineOutputName, cu).c_str(), &err);
111
112 // inside out
113 m_insideOutInput = cl::Kernel(m_program, get_cu_name(m_insideOutInputName, cu).c_str(), &err);
114 m_insideOutOutput = cl::Kernel(m_program, get_cu_name(m_insideOutOutputName, cu).c_str(), &err);
115
116
117 m_queue = cl::CommandQueue(m_context, m_accelerator, CL_QUEUE_PROFILING_ENABLE | CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, &err);
118
119 if (err != CL_SUCCESS) {
120 return StatusCode::FAILURE;
121 }
122
123 ATH_CHECK(m_xaodClusterMaker.retrieve());
124 ATH_CHECK(m_testVectorTool.retrieve());
127
128 // Initialize track sim keys
129 ATH_CHECK(m_FPGAHitKey.initialize());
130 ATH_CHECK(m_FPGASlicedHitKey.initialize());
131 ATH_CHECK(m_FPGATrackKey.initialize());
132
133 ATH_CHECK(m_FPGATrackOutput.initialize());
134
135 // Only needed if we are running the full F150
136 ATH_CHECK(m_FPGAStripRDO.initialize());
137 ATH_CHECK(m_FPGAPixelRDO.initialize());
142
143 return StatusCode::SUCCESS;
144 }
Gaudi::Property< std::string > m_slicingEngineInputName
Gaudi::Property< std::string > m_pixelEdmKernelName
Name of the FPGA kernel.
Gaudi::Property< std::string > m_slicingEngineOutputName
Gaudi::Property< std::string > m_insideOutOutputName
Gaudi::Property< std::string > m_stripL2GKernelName
Name of the strip L2G kernelS.
Gaudi::Property< std::string > m_xclbin
Path and name of the xclbin file.
ToolHandle< xAODClusterMaker > m_xaodClusterMaker
Tool for creating xAOD containers.
Gaudi::Property< std::string > m_pixelClusterKernelName
Name of the pixel clustering kernel.
Gaudi::Property< std::string > m_insideOutInputName
ToolHandle< TestVectorTool > m_testVectorTool
Tool for preparing test vectors.
ToolHandle< OutputConversionTool > m_outputConversionTool
std::string get_cu_name(const std::string &kernel_name, int cu)
ServiceHandle< IChronoSvc > m_chronoSvc
Service for timing the algorithm.
Gaudi::Property< std::string > m_stripClusterKernelName
Name of the strip clustering kernel.
Gaudi::Property< std::string > m_stripEdmKernelName
Name of the FPGA kernel.
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::Device m_accelerator
Device object for the accelerator card.

◆ 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}
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)
#define ATH_MSG_WARNING(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/30]

cl::Event m_slicingEngineInputEndEvent EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
private

Definition at line 102 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [2/30]

cl::Event m_slicingEngineOutputEndEvent EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
private

Definition at line 103 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [3/30]

cl::Event m_insideOutEndEvent EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
private

Definition at line 104 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [4/30]

cl::Kernel m_slicingEngineInput EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 107 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [5/30]

cl::Kernel m_slicingEngineOutput EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 108 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [6/30]

cl::Kernel m_insideOutInput EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 109 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [7/30]

cl::Kernel m_insideOutOutput EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 110 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [8/30]

cl::Buffer m_slicingEngineInputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 113 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [9/30]

cl::Buffer m_slicingEngineOutputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 114 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [10/30]

cl::Buffer m_insideOutInputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 115 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [11/30]

cl::Buffer m_insideOutOutputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 116 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [12/30]

cl::Kernel m_pixelClusteringKernel EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 120 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [13/30]

cl::Kernel m_stripClusteringKernel EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 121 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [14/30]

cl::Kernel m_stripL2GKernel EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 123 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [15/30]

cl::Kernel m_pixelEdmPrepKernel EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 125 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [16/30]

cl::Kernel m_stripEdmPrepKernel EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 126 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [17/30]

cl::Buffer m_pixelClusterInputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 129 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [18/30]

cl::Buffer m_stripClusterInputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 130 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [19/30]

cl::Buffer m_pixelClusterOutputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 132 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [20/30]

cl::Buffer m_stripClusterOutputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 133 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [21/30]

cl::Buffer m_pixelClusterEDMOutputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 134 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [22/30]

cl::Buffer m_stripClusterEDMOutputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 135 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [23/30]

cl::Buffer m_stripL2GInputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 137 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [24/30]

cl::Buffer m_stripL2GEDMInputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 138 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [25/30]

cl::Buffer m_stripL2GOutputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 140 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [26/30]

cl::Buffer m_stripL2GEDMOutputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 141 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [27/30]

cl::Buffer m_edmPixelInputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 143 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [28/30]

cl::Buffer m_edmStripInputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 144 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [29/30]

cl::Buffer m_edmPixelOutputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 146 of file F150KernelTesterAlg.h.

◆ ATLAS_THREAD_SAFE [30/30]

cl::Buffer m_edmStripOutputBuffer EFTrackingFPGAIntegration::F150KernelTesterAlg::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 147 of file F150KernelTesterAlg.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::F150KernelTesterAlg::m_chronoSvc
private
Initial value:
{
"ChronoStatSvc", name()}

Service for timing the algorithm.

Definition at line 50 of file F150KernelTesterAlg.h.

50 {
51 "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_FPGADataFormatTool

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

Tool for formatting FPGA data.

Definition at line 62 of file F150KernelTesterAlg.h.

62 {
63 this, "FPGADataFormatTool", "FPGADataFormatTool", "Tool for formatting FPGA data"};

◆ m_FPGAHitKey

SG::ReadHandleKey<FPGATrackSimHitCollection> EFTrackingFPGAIntegration::F150KernelTesterAlg::m_FPGAHitKey {this, "FPGATrackSimHitKey","FPGAHits", "FPGATrackSim hits key"}
private

Definition at line 73 of file F150KernelTesterAlg.h.

73{this, "FPGATrackSimHitKey","FPGAHits", "FPGATrackSim hits key"}; // Pixel CLS Output

◆ m_FPGAPixelOutput

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

Definition at line 155 of file F150KernelTesterAlg.h.

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

◆ m_FPGAPixelRDO

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

Definition at line 149 of file F150KernelTesterAlg.h.

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

◆ m_FPGAPixelRDOSize

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

Definition at line 152 of file F150KernelTesterAlg.h.

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

◆ m_FPGASlicedHitKey

SG::ReadHandleKey<FPGATrackSimHitCollection> EFTrackingFPGAIntegration::F150KernelTesterAlg::m_FPGASlicedHitKey {this, "FPGATrackSimHitKey_1st", "FPGAHits_1st_reg34", "FPGATrackSim Hits 1st stage key"}
private

Definition at line 74 of file F150KernelTesterAlg.h.

74{this, "FPGATrackSimHitKey_1st", "FPGAHits_1st_reg34", "FPGATrackSim Hits 1st stage key"}; // Slicing Engine Output

◆ m_FPGAStripOutput

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

Definition at line 156 of file F150KernelTesterAlg.h.

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

◆ m_FPGAStripRDO

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

Definition at line 150 of file F150KernelTesterAlg.h.

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

◆ m_FPGAStripRDOSize

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

Definition at line 153 of file F150KernelTesterAlg.h.

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

◆ m_FPGATrackKey

SG::ReadHandleKey<FPGATrackSimTrackCollection> EFTrackingFPGAIntegration::F150KernelTesterAlg::m_FPGATrackKey {this, "FPGATrackSimTrack1stKey","FPGATracks_1st_reg34","FPGATrackSim Tracks 1st stage key"}
private

Definition at line 75 of file F150KernelTesterAlg.h.

75{this, "FPGATrackSimTrack1stKey","FPGATracks_1st_reg34","FPGATrackSim Tracks 1st stage key"}; // Inside Out Output

◆ m_FPGATrackOutput

SG::WriteHandleKey<std::vector<uint64_t> > EFTrackingFPGAIntegration::F150KernelTesterAlg::m_FPGATrackOutput {this, "FPGAOutputTrackKey", "FPGATrackOutput", "Track output from FPGA format"}
private

Definition at line 77 of file F150KernelTesterAlg.h.

77{this, "FPGAOutputTrackKey", "FPGATrackOutput", "Track output from FPGA format"};

◆ m_insideOutInputName

Gaudi::Property<std::string> EFTrackingFPGAIntegration::F150KernelTesterAlg::m_insideOutInputName {this, "InsideOutInputName", "", "Name of the inside out input kernel"}
private

Definition at line 85 of file F150KernelTesterAlg.h.

85{this, "InsideOutInputName", "", "Name of the inside out input kernel"};

◆ m_insideOutOutputName

Gaudi::Property<std::string> EFTrackingFPGAIntegration::F150KernelTesterAlg::m_insideOutOutputName {this, "InsideOutOutputName", "", "Name of the inside out output kernel"}
private

Definition at line 86 of file F150KernelTesterAlg.h.

86{this, "InsideOutOutputName", "", "Name of the inside out output kernel"};

◆ m_IO_kernelTime

std::atomic<cl_ulong> EFTrackingFPGAIntegration::F150KernelTesterAlg::m_IO_kernelTime {0}
mutableprivate

Time for kernel execution.

Definition at line 96 of file F150KernelTesterAlg.h.

96{0};

◆ m_numEvents

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

Number of events for the average time of the kernel execution.

Definition at line 98 of file F150KernelTesterAlg.h.

98{0};

◆ m_outputConversionTool

ToolHandle<OutputConversionTool> EFTrackingFPGAIntegration::F150KernelTesterAlg::m_outputConversionTool {this, "OutputConversionTool", "OutputConversionTool", "tool for output conversion"}
private

Definition at line 80 of file F150KernelTesterAlg.h.

80{this, "OutputConversionTool", "OutputConversionTool", "tool for output conversion"};

◆ m_outputTextFile

Gaudi::Property<bool> EFTrackingFPGAIntegration::F150KernelTesterAlg::m_outputTextFile {this, "outputTextFile", "", "Whether to output text file"}
private

Whether to run SE or not.

Definition at line 71 of file F150KernelTesterAlg.h.

71{this, "outputTextFile", "", "Whether to output text file"};

◆ m_pixelClusterKernelName

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

Name of the pixel clustering kernel.

Definition at line 91 of file F150KernelTesterAlg.h.

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

◆ m_pixelEdmKernelName

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

Name of the FPGA kernel.

Definition at line 89 of file F150KernelTesterAlg.h.

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

◆ m_program

cl::Program IntegrationBase::m_program
protectedinherited

Program object containing the kernel.

Definition at line 68 of file IntegrationBase.h.

◆ m_queue

cl::CommandQueue EFTrackingFPGAIntegration::F150KernelTesterAlg::m_queue
private

Definition at line 158 of file F150KernelTesterAlg.h.

◆ m_runFull150

Gaudi::Property<bool> EFTrackingFPGAIntegration::F150KernelTesterAlg::m_runFull150 {this, "RunFullF150", "", "Whether to run Full 150 chain"}
private

Whether to run the Full F150 include F100 on hy.

Definition at line 70 of file F150KernelTesterAlg.h.

70{this, "RunFullF150", "", "Whether to run Full 150 chain"};

◆ m_runIO

Gaudi::Property<bool> EFTrackingFPGAIntegration::F150KernelTesterAlg::m_runIO {this, "RunInsideOut", "", "Whether to run inside out or not"}
private

Whether to run inside out or not.

Definition at line 68 of file F150KernelTesterAlg.h.

68{this, "RunInsideOut", "", "Whether to run inside out or not"};

◆ m_runIOOnSE

Gaudi::Property<bool> EFTrackingFPGAIntegration::F150KernelTesterAlg::m_runIOOnSE {this, "RunInsideOutOnSlicingEngine", "", "Whether to run inside out on the output of the slicing engine"}
private

Whether to run inside out on the output of slicing engine.

Definition at line 69 of file F150KernelTesterAlg.h.

69{this, "RunInsideOutOnSlicingEngine", "", "Whether to run inside out on the output of the slicing engine"};

◆ m_runSE

Gaudi::Property<bool> EFTrackingFPGAIntegration::F150KernelTesterAlg::m_runSE {this, "RunSlicing", "", "Whether to run slicing engine or not"}
private

Whether to run SE or not.

Definition at line 67 of file F150KernelTesterAlg.h.

67{this, "RunSlicing", "", "Whether to run slicing engine or not"};

◆ m_SE_kernelTime

std::atomic<cl_ulong> EFTrackingFPGAIntegration::F150KernelTesterAlg::m_SE_kernelTime {0}
mutableprivate

Sum for the average time of the kernel execution.

Definition at line 97 of file F150KernelTesterAlg.h.

97{0};

◆ m_slicingEngineInputName

Gaudi::Property<std::string> EFTrackingFPGAIntegration::F150KernelTesterAlg::m_slicingEngineInputName {this, "SlicingEngineInputName", "", "Name of the slicing engine input kernel"}
private

Definition at line 83 of file F150KernelTesterAlg.h.

83{this, "SlicingEngineInputName", "", "Name of the slicing engine input kernel"};

◆ m_slicingEngineOutputName

Gaudi::Property<std::string> EFTrackingFPGAIntegration::F150KernelTesterAlg::m_slicingEngineOutputName {this, "SlicingEngineOutputName", "", "Name of the slicing engine output kernel"}
private

Definition at line 84 of file F150KernelTesterAlg.h.

84{this, "SlicingEngineOutputName", "", "Name of the slicing engine output kernel"};

◆ m_stripClusterKernelName

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

Name of the strip clustering kernel.

Definition at line 92 of file F150KernelTesterAlg.h.

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

◆ m_stripEdmKernelName

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

Name of the FPGA kernel.

Definition at line 90 of file F150KernelTesterAlg.h.

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

◆ m_stripL2GKernelName

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

Name of the strip L2G kernelS.

Definition at line 93 of file F150KernelTesterAlg.h.

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

◆ m_testVectorTool

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

Tool for preparing test vectors.

Definition at line 59 of file F150KernelTesterAlg.h.

59 {
60 this, "TestVectorTool", "TestVectorTool", "Tool for preparing test vectors"};

◆ 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::F150KernelTesterAlg::m_xaodClusterMaker
private
Initial value:
{
this,
"xAODClusterMaker",
"xAODClusterMaker",
"Tool for creating xAOD cluster containers"}

Tool for creating xAOD containers.

Definition at line 53 of file F150KernelTesterAlg.h.

53 {
54 this,
55 "xAODClusterMaker",
56 "xAODClusterMaker",
57 "Tool for creating xAOD cluster containers"};

◆ m_xclbin

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

Path and name of the xclbin file.

Definition at line 65 of file F150KernelTesterAlg.h.

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

◆ m_xrt_accelerator

xrt::device EFTrackingFPGAIntegration::F150KernelTesterAlg::m_xrt_accelerator
private

Definition at line 100 of file F150KernelTesterAlg.h.


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