|
ATLAS Offline Software
|
Go to the documentation of this file.
4 #ifndef ATHXRTSERVICES_DEVICEMGMTSVC_H
5 #define ATHXRTSERVICES_DEVICEMGMTSVC_H
12 #include "Gaudi/Parsers/Factory.h"
13 #include "Gaudi/Property.h"
14 #include "GaudiKernel/ServiceHandle.h"
35 using extends::extends;
54 virtual const std::vector<IDeviceMgmtSvc::OpenCLHandle>
60 virtual const std::vector<std::shared_ptr<xrt::device>>
76 "The list of XCLBIN files to program on FPGAs"};
122 const cl::Device &device)
const;
143 #endif // ATHXRTSERVICES_DEVICEMGMTSVC_H
virtual const std::vector< IDeviceMgmtSvc::OpenCLHandle > get_opencl_handles_by_kernel_name(const std::string &name) const override
Get a list of OpenCL handles providing the specified kernel.
virtual StatusCode finalize() override
Finalise the service.
std::size_t different_xclbin_count
std::vector< std::string > kernel_names
Struct to hold information about a context, as well as the devices, the program and XCLBIN file assoc...
std::vector< XclbinInfo > m_xclbin_infos
List of XCLBIN files info configured for the service.
std::size_t different_xclbin_fpga_device_name
virtual const std::vector< std::shared_ptr< xrt::device > > get_xrt_devices_by_kernel_name(const std::string &name) const override
Get a list of XRT devices providing the specified kernel.
std::string get_device_bdf(const cl::Device &device) const
Get the BDF (bus:device:function) string of a cl::device.
StatusCode inspect_xclbins(SystemInfo &si)
Inspect the provided XCLBIN files and fill the SystemInfo structure.
std::string fpga_device_name
Struct to hold information about an XCLBIN file, as well as the kernels it contains.
virtual StatusCode initialize() override
Initialise the service.
bool is_xclbin_compatible_with_device(const DeviceMgmtSvc::XclbinInfo &xclbin_info, const cl::Device &device) const
Helper function to check if an XCLBIN file is compatible with a device.
Gaudi::Property< std::vector< std::string > > m_xclbin_path_list
The list of xclbin files to use.
::StatusCode StatusCode
StatusCode definition for legacy code.
Service used for programming XRT compatible accelerators.
std::vector< std::vector< cl::Device > > device_types
std::shared_ptr< cl::Context > context
std::vector< cl::Device > devices
std::string get_device_name(const cl::Device &device) const
Get the name of a cl::device.
std::vector< AthClContext > m_ath_cl_contexts
List of contexts configured for the service.
std::shared_ptr< cl::Program > program
StatusCode pair_devices_and_xclbins(const SystemInfo &si)
Pair devices and XCLBINs and create contexts.
StatusCode inspect_devices(SystemInfo &si)
Inspect the available devices and fill the SystemInfo structure.
StatusCode program_devices()
Program the devices with the XCLBIN files and create contexts.