|
ATLAS Offline Software
|
Go to the documentation of this file.
39 ATH_MSG_INFO(
"Running the DataPrep pipeline on the FPGA accelerator");
63 return StatusCode::SUCCESS;
72 std::unique_ptr<EFTrackingDataFormats::Metadata>
metadata =
73 std::make_unique<EFTrackingDataFormats::Metadata>();
79 return StatusCode::SUCCESS;
83 ATH_MSG_INFO(
"Running the FPGA Data Preparation Pipeline");
101 std::vector<uint64_t> fpgaOutput(pixelTV.
inputTV.size() * 2, 0);
121 fpgaOutput = std::vector<uint64_t>(spacepointTV.
inputTV.size() * 2, 0);
128 acc_queue.enqueueReadBuffer(
m_spacepointInBuff, CL_TRUE, 0,
sizeof(
uint64_t) * fpgaOutput.size(), fpgaOutput.data(), NULL, NULL);
139 return StatusCode::SUCCESS;
148 unsigned int size = 100000;
150 if (
err != CL_SUCCESS)
152 ATH_MSG_ERROR(
"Failed to allocate intput buffer for pixel clustering");
153 return StatusCode::FAILURE;
157 if (
err != CL_SUCCESS)
159 ATH_MSG_ERROR(
"Failed to allocate output buffer for pixel clustering");
160 return StatusCode::FAILURE;
164 if (
err != CL_SUCCESS)
166 ATH_MSG_ERROR(
"Failed to allocate input buffer for spacepoint");
167 return StatusCode::FAILURE;
171 if (
err != CL_SUCCESS)
173 ATH_MSG_ERROR(
"Failed to allocate output buffer for spacepoint");
174 return StatusCode::FAILURE;
177 return StatusCode::SUCCESS;
192 return StatusCode::SUCCESS;
Gaudi::Property< std::string > m_pixelClusterRefTVPath
Pixel cluster reference test vector.
std::vector< uint64_t > refTV
cl::Device m_accelerator
Device object for the accelerator card.
virtual StatusCode initialize() override
Detect the OpenCL devices and prepare OpenCL context.
Gaudi::Property< std::string > m_pixelClusteringKernelName
Pixle clustering kernel name.
cl::Buffer m_spacepointOutBuff
Buffer for spacepoint output.
cl::Context m_context
Context object for the application.
StatusCode execute(const EventContext &ctx) const override final
Should be overriden by derived classes to perform meaningful work.
Gaudi::Property< std::string > m_pixelClusterTVPath
Pixel cluster test vector.
cl::Buffer m_pxlClusteringOutBuff
Buffer for pixel clustering output.
Gaudi::Property< std::string > m_spacepointTVPath
Spacepoint test vector.
Gaudi::Property< std::string > m_spacepointRefTVPath
Spacepoint reference test vector.
Class for the data preparation pipeline.
ToolHandle< PassThroughTool > m_passThroughTool
Tool handle for PassThroughTool.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< bool > m_useTV
Use test vector.
cl::Kernel m_spacepointKernel
Kernel for spacepoint.
Gaudi::Property< std::string > m_passThroughKernelName
Pass through kernel name.
Gaudi::Property< std::string > m_xclbin
Path and name of the xclbin file.
StatusCode loadProgram(const std::string &xclbin)
Find the xclbin file and load it into the OpenCL program object.
StatusCode precheck(std::vector< Gaudi::Property< std::string >> inputs) const
Check if the the desired Gaudi properties are set.
Gaudi::Property< std::string > m_spacepointKernelName
Spacepoint kernel name.
StatusCode initialize() override final
Detect the OpenCL devices and prepare OpenCL context.
StatusCode setupBuffers()
Gaudi::Property< bool > m_usePassThrough
Use the pass through tool instead of data prep pipeline.
ToolHandle< TestVectorTool > m_testVectorTool
Tool handle for TestVectorTool.
cl::Buffer m_spacepointInBuff
Buffer for spacepoint input.
StatusCode setupKernelArgs()
cl::Kernel m_pixelClusteringKernel
Kernel for pixel clustering.
cl::Program m_program
Program object containing the kernel.
ToolHandle< xAODContainerMaker > m_xAODContainerMaker
Tool handle for xAODContainerMaker.
Helper functions intended to be called from the debugger.
std::vector< uint64_t > inputTV
cl::Buffer m_pxlClusteringInBuff
Buffer for pixel clustering input.