 |
ATLAS Offline Software
|
Go to the documentation of this file.
39 ATH_MSG_INFO(
"Running the DataPrep pipeline on the FPGA accelerator");
64 return StatusCode::SUCCESS;
78 std::unique_ptr<EFTrackingTransient::Metadata>
metadata =
79 std::make_unique<EFTrackingTransient::Metadata>();
89 return StatusCode::SUCCESS;
93 ATH_MSG_INFO(
"Running the FPGA Data Preparation Pipeline");
111 std::vector<uint64_t> fpgaOutput(pixelTV.
inputTV.size() * 2, 0);
131 fpgaOutput = std::vector<uint64_t>(spacepointTV.
inputTV.size() * 2, 0);
138 acc_queue.enqueueReadBuffer(
m_spacepointInBuff, CL_TRUE, 0,
sizeof(
uint64_t) * fpgaOutput.size(), fpgaOutput.data(), NULL, NULL);
149 return StatusCode::SUCCESS;
158 unsigned int size = 100000;
160 if (
err != CL_SUCCESS)
162 ATH_MSG_ERROR(
"Failed to allocate intput buffer for pixel clustering");
163 return StatusCode::FAILURE;
167 if (
err != CL_SUCCESS)
169 ATH_MSG_ERROR(
"Failed to allocate output buffer for pixel clustering");
170 return StatusCode::FAILURE;
174 if (
err != CL_SUCCESS)
176 ATH_MSG_ERROR(
"Failed to allocate input buffer for spacepoint");
177 return StatusCode::FAILURE;
181 if (
err != CL_SUCCESS)
183 ATH_MSG_ERROR(
"Failed to allocate output buffer for spacepoint");
184 return StatusCode::FAILURE;
187 return StatusCode::SUCCESS;
202 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.
ToolHandle< xAODSpacePointMaker > m_xAODSpacePointMaker
Tool handle for xAODSpacePointMaker.
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.
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.
StatusCode precheck(const std::vector< Gaudi::Property< std::string >> &inputs) const
Check if the the desired Gaudi properties are set.
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.
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.
ToolHandle< xAODClusterMaker > m_xAODClusterMaker
Tool handle for xAODClusterMaker.
StatusCode setupKernelArgs()
cl::Kernel m_pixelClusteringKernel
Kernel for pixel clustering.
cl::Program m_program
Program object containing the kernel.
Helper functions intended to be called from the debugger.
std::vector< uint64_t > inputTV
cl::Buffer m_pxlClusteringInBuff
Buffer for pixel clustering input.