ATLAS Offline Software
Classes | Private Member Functions | Private Attributes | List of all members
AthXRT::DeviceMgmtSvc Class Reference

Service used for programming XRT compatible accelerators. More...

#include <DeviceMgmtSvc.h>

Inheritance diagram for AthXRT::DeviceMgmtSvc:
Collaboration diagram for AthXRT::DeviceMgmtSvc:

Classes

struct  AthClContext
 Struct to hold information about a context, as well as the devices, the program and XCLBIN file associated with the context. More...
 
struct  SystemInfo
 
struct  XclbinInfo
 Struct to hold information about an XCLBIN file, as well as the kernels it contains. More...
 

Public Member Functions

Interface inherited from @c IService
virtual StatusCode initialize () override
 Initialise the service. More...
 
virtual StatusCode finalize () override
 Finalise the service. More...
 
Interface inherited from @c AthXRT::IDeviceMgmtSvc
virtual const std::vector< IDeviceMgmtSvc::OpenCLHandleget_opencl_handles_by_kernel_name (const std::string &name) const override
 Get a list of OpenCL handles providing the specified kernel. More...
 
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. More...
 

Private Member Functions

std::string get_device_name (const cl::Device &device) const
 Get the name of a cl::device. More...
 
std::string get_device_bdf (const cl::Device &device) const
 Get the BDF (bus:device:function) string of a cl::device. More...
 
StatusCode inspect_devices (SystemInfo &si)
 Inspect the available devices and fill the SystemInfo structure. More...
 
StatusCode inspect_xclbins (SystemInfo &si)
 Inspect the provided XCLBIN files and fill the SystemInfo structure. More...
 
StatusCode pair_devices_and_xclbins (const SystemInfo &si)
 Pair devices and XCLBINs and create contexts. More...
 
StatusCode program_devices ()
 Program the devices with the XCLBIN files and create contexts. More...
 
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. More...
 

Private Attributes

std::vector< XclbinInfom_xclbin_infos
 List of XCLBIN files info configured for the service. More...
 
std::vector< AthClContextm_ath_cl_contexts
 List of contexts configured for the service. More...
 
Service properties
Gaudi::Property< std::vector< std::string > > m_xclbin_path_list
 The list of xclbin files to use. More...
 

Detailed Description

Service used for programming XRT compatible accelerators.

This service aims to be a central point for managing XRT compatible accelerators. It will enumerate the available devices, program them with the specified XCLBIN files and provide a way for client algorithms to request lists of devices by kernel name, either using native XRT API or OpenCL API.

Author
Quentin Berthet quent.nosp@m.in.b.nosp@m.erthe.nosp@m.t@ce.nosp@m.rn.ch

Definition at line 31 of file DeviceMgmtSvc.h.

Member Function Documentation

◆ finalize()

StatusCode AthXRT::DeviceMgmtSvc::finalize ( )
overridevirtual

Finalise the service.

Definition at line 470 of file DeviceMgmtSvc.cxx.

470  {
471 
472  // Finalise the base class.
474 
475  // Return gracefully.
476  return StatusCode::SUCCESS;
477 }

◆ get_device_bdf()

std::string AthXRT::DeviceMgmtSvc::get_device_bdf ( const cl::Device &  device) const
private

Get the BDF (bus:device:function) string of a cl::device.

Parameters
deviceThe device to get the BDF from.
Returns
The BDF of the device as a string, or "error" in case of failure.

Definition at line 179 of file DeviceMgmtSvc.cxx.

179  {
180 
181  cl_int err = CL_SUCCESS;
182  std::string device_bdf;
183  err = device.getInfo(CL_DEVICE_PCIE_BDF, &device_bdf);
184  if (err != CL_SUCCESS) {
185  ATH_MSG_ERROR("Failed to get device BDF");
186  return std::string("error");
187  }
188  return device_bdf;
189 }

◆ get_device_name()

std::string AthXRT::DeviceMgmtSvc::get_device_name ( const cl::Device &  device) const
private

Get the name of a cl::device.

Parameters
deviceThe device to get the name from.
Returns
The name of the device as a string, or "error" in case of failure.

Definition at line 164 of file DeviceMgmtSvc.cxx.

164  {
165 
166  cl_int err = CL_SUCCESS;
167  std::string device_name;
168  err = device.getInfo(CL_DEVICE_NAME, &device_name);
169  if (err != CL_SUCCESS) {
170  ATH_MSG_ERROR("Failed to get device name");
171  return std::string("error");
172  }
173  return device_name;
174 }

◆ get_opencl_handles_by_kernel_name()

const std::vector< IDeviceMgmtSvc::OpenCLHandle > AthXRT::DeviceMgmtSvc::get_opencl_handles_by_kernel_name ( const std::string &  name) const
overridevirtual

Get a list of OpenCL handles providing the specified kernel.

Parameters
nameThe name of the kernel to search for.
Returns
A vector of OpenCL handles structs providing the specified kernel.

Definition at line 501 of file DeviceMgmtSvc.cxx.

502  {
503 
504  std::vector<IDeviceMgmtSvc::OpenCLHandle> handles;
505 
506  // Iterate over all contexts and check if the kernel name is in the list.
507  // If so, add the context and program to the list of handles to return.
508  for (const AthClContext &ath_cl_context : m_ath_cl_contexts) {
509  if (std::find(ath_cl_context.xclbin_info.kernel_names.begin(),
510  ath_cl_context.xclbin_info.kernel_names.end(),
511  name) != ath_cl_context.xclbin_info.kernel_names.end()) {
512  IDeviceMgmtSvc::OpenCLHandle handle = {ath_cl_context.context,
513  ath_cl_context.program};
514  handles.push_back(handle);
515  }
516  }
517 
518  return handles;
519 }

◆ get_xrt_devices_by_kernel_name()

const std::vector< std::shared_ptr< xrt::device > > AthXRT::DeviceMgmtSvc::get_xrt_devices_by_kernel_name ( const std::string &  name) const
overridevirtual

Get a list of XRT devices providing the specified kernel.

Parameters
nameThe name of the kernel to search for.
Returns
A vector of XRT device handles providing the specified kernel.

Definition at line 480 of file DeviceMgmtSvc.cxx.

480  {
481 
482  std::vector<std::shared_ptr<xrt::device>> devices;
483 
484  // Iterate over all contexts and check if the kernel name is in the list.
485  // If so, add the device(s) to the list of devices to return.
486  for (const AthClContext &ath_cl_context : m_ath_cl_contexts) {
487  if (std::find(ath_cl_context.xclbin_info.kernel_names.begin(),
488  ath_cl_context.xclbin_info.kernel_names.end(),
489  name) != ath_cl_context.xclbin_info.kernel_names.end()) {
490  for (const cl::Device &device : ath_cl_context.devices) {
491  devices.push_back(std::make_shared<xrt::device>(
492  xrt::opencl::get_xrt_device(device())));
493  }
494  }
495  }
496 
497  return devices;
498 }

◆ initialize()

StatusCode AthXRT::DeviceMgmtSvc::initialize ( )
overridevirtual

Initialise the service.

Initialize the service.

This function will inspect the available devices and XCLBIN files, pair them and create contexts based on the information gathered. It will then program the devices with the XCLBIN files and create contexts.

Returns
StatusCode::SUCCESS if the initialization was successful, or StatusCode::FAILURE otherwise.

Definition at line 446 of file DeviceMgmtSvc.cxx.

446  {
447 
448  SystemInfo sys_info;
449 
450  // Inspect available device(s) and fill sys_info.
451  ATH_CHECK(inspect_devices(sys_info));
452 
453  // Inspect provided XCLBINs to gather information about kernel(s)
454  // into sys_info and a list of XclbinInfo.
455  ATH_CHECK(inspect_xclbins(sys_info));
456 
457  // Now we can make a decision about the pairing of device(s)
458  // and xclbin(s), and the number of required context(s) by
459  // filling m_ath_cl_contexts.
461 
462  // Program the devices with the XCLBINs and create contexts,
463  // and programs based on m_ath_cl_contexts.
465 
466  // Return gracefully.
467  return StatusCode::SUCCESS;
468 }

◆ inspect_devices()

StatusCode AthXRT::DeviceMgmtSvc::inspect_devices ( SystemInfo si)
private

Inspect the available devices and fill the SystemInfo structure.

Find all available XRT compatible accelerator devices and group them by type.

Parameters
siThe SystemInfo structure to fill

Definition at line 18 of file DeviceMgmtSvc.cxx.

18  {
19 
20  std::vector<cl::Platform> platforms;
21 
22  ATH_CHECK(cl::Platform::get(&platforms) == CL_SUCCESS);
23  si.device_count = 0;
24  for (const cl::Platform &platform : platforms) {
25 
26  // Filter platforms by name. Currently AMD FPGA platform is
27  // still referenced as "Xilinx".
28  std::string platform_name;
29  ATH_CHECK(platform.getInfo(CL_PLATFORM_NAME, &platform_name) == CL_SUCCESS);
30  if (platform_name != "Xilinx") {
31  ATH_MSG_WARNING("Skipping unsuported platform " << platform_name);
32  continue;
33  }
34 
35  // Get devices list for the platform and count total devices.
36  std::vector<cl::Device> devices;
37  ATH_CHECK(platform.getDevices(CL_DEVICE_TYPE_ACCELERATOR, &devices) ==
38  CL_SUCCESS);
39  ATH_MSG_DEBUG("Found XRT/OpenCL platform '" << platform_name << "' with "
40  << devices.size()
41  << " devices");
42  si.device_count += devices.size();
43 
44  // Group devices by type, using the name property.
45  // All similar devices should have the same name,
46  // I.E: "xilinx_u250_gen3x16_xdma_shell_4_1"
47  for (const cl::Device &device : devices) {
48  const std::string device_name = get_device_name(device);
49 
50  // Check if we already have a device with the same name.
51  bool found = false;
52  for (std::vector<cl::Device> &list : si.device_types) {
53  std::string list_device_name;
54  ATH_CHECK(list[0].getInfo(CL_DEVICE_NAME, &list_device_name) ==
55  CL_SUCCESS);
56  if (device_name == list_device_name) {
57  found = true;
58  list.push_back(device);
59  break;
60  }
61  }
62  if (!found) {
63  std::vector<cl::Device> new_list = {device};
64  si.device_types.push_back(new_list);
65  }
66  }
67  }
68 
69  // We expect to have at least one device to program.
70  if (si.device_count < 1) {
71  // This should not be this catastrophic and we could fallback to
72  // software implementation, but for now we will consider that an
73  // accelerator have to be present if this service is configured.
74  ATH_MSG_ERROR("No XRT device found");
75  return StatusCode::FAILURE;
76  } else {
77  ATH_MSG_INFO("Found a total of "
78  << si.device_count << " AMD FPGA device(s) ("
79  << si.device_types.size() << " device type(s))");
80  }
81 
82  return StatusCode::SUCCESS;
83 
84 } // DeviceMgmtSvc::inspect_devices()

◆ inspect_xclbins()

StatusCode AthXRT::DeviceMgmtSvc::inspect_xclbins ( SystemInfo si)
private

Inspect the provided XCLBIN files and fill the SystemInfo structure.

Gather information using XRT native API about the XCLBIN files and the kernel(s) they contain and perform some basic sanity checks.

Parameters
siThe SystemInfo structure to fill

Definition at line 90 of file DeviceMgmtSvc.cxx.

90  {
91 
92  // We expect at least one XCLBIN file to be specified.
93  if (m_xclbin_path_list.empty()) {
94  ATH_MSG_ERROR("No XCLBIN list specified");
95  return StatusCode::FAILURE;
96  }
97 
98  // If there is more XCLBIN files to program than device(s), this
99  // is probably an error (the opposite is ok).
100  if (m_xclbin_path_list.size() > si.device_count) {
102  "More XCLBIN file(s) specified than "
103  "devices type available ("
104  << si.device_count << "): ");
105  for (const std::string &xclbin_path : m_xclbin_path_list) {
106  ATH_MSG_ERROR(xclbin_path);
107  }
108  return StatusCode::FAILURE;
109  }
110 
111  // Inspect XCLBIN files.
112  for (const std::string &xclbin_path : m_xclbin_path_list) {
113 
114  if (!std::filesystem::exists(xclbin_path)) {
115  ATH_MSG_ERROR("XCLBIN file does not exist: " << xclbin_path);
116  return StatusCode::FAILURE;
117  }
118 
119  // Create a temporary XRT API XCLBIN object to use introspection
120  // to gather some information. With this approach, we are loading
121  // them twice from disk which is not optimal.
122  DeviceMgmtSvc::XclbinInfo xclbin_info;
123  try {
124  xrt::xclbin xrt_xclbin(xclbin_path);
125  xclbin_info.path = xclbin_path;
126  xclbin_info.xsa_name = xrt_xclbin.get_xsa_name();
127  xclbin_info.fpga_device_name = xrt_xclbin.get_fpga_device_name();
128  xclbin_info.uuid = xrt_xclbin.get_uuid().to_string();
129  for (const xrt::xclbin::kernel &kernel : xrt_xclbin.get_kernels()) {
130  // Ensure that the kernel have a least one compute unit.
131  // Having a kernel without compute unit is not a common use case,
132  // but it is possible if a .xo with a kernel is linked in the
133  // .xclbin, but the number of said kernel is set to 0.
134  if (!kernel.get_cus().empty()) {
135  xclbin_info.kernel_names.push_back(kernel.get_name());
136  }
137  }
138  } catch (...) {
139  ATH_MSG_ERROR("Could not create xrt::xclbin from " << xclbin_path);
140  return StatusCode::FAILURE;
141  }
142  m_xclbin_infos.push_back(xclbin_info);
143  }
144 
145  // Extract some more information from the XCLBIN collection:
146  // The number of different XCLBIN files and the number of different
147  // FPGA device names targeted by the XCLBIN files.
148  std::set<std::string> uuids;
149  std::set<std::string> fpga_device_names;
150  for (const XclbinInfo &info : m_xclbin_infos) {
151  uuids.insert(info.uuid);
152  fpga_device_names.insert(info.fpga_device_name);
153  }
154  si.different_xclbin_count = uuids.size();
155  si.different_xclbin_fpga_device_name = fpga_device_names.size();
156 
157  return StatusCode::SUCCESS;
158 
159 } // DeviceMgmtSvc::inspect_xclbin()

◆ is_xclbin_compatible_with_device()

bool AthXRT::DeviceMgmtSvc::is_xclbin_compatible_with_device ( const DeviceMgmtSvc::XclbinInfo xclbin_info,
const cl::Device &  device 
) const
private

Helper function to check if an XCLBIN file is compatible with a device.

Check if an XCLBIN is compatible with a device.

This is done by comparing the device name and the XSA name used in the XCLBIN file up to the second occurrence of the underscore character. This check is not a guarantee that the XCLBIN will work on the device, but mismatching XSA names are a strong indicator of incompatibility.

Parameters
xclbin_infoThe XCLBIN to check compatibility with.
deviceThe device to check compatibility with.
Returns
True if the XCLBIN is compatible with the device, false otherwise.

Definition at line 226 of file DeviceMgmtSvc.cxx.

228  {
229 
230  const std::string device_prefix =
231  getPrefixUpToNthOccurrence(get_device_name(device), '_', 2);
232  const std::string xsa_prefix =
233  getPrefixUpToNthOccurrence(xclbin_info.xsa_name, '_', 2);
234  if (device_prefix == xsa_prefix) {
235  return true;
236  } else {
237  return false;
238  }
239 }

◆ pair_devices_and_xclbins()

StatusCode AthXRT::DeviceMgmtSvc::pair_devices_and_xclbins ( const SystemInfo si)
private

Pair devices and XCLBINs and create contexts.

This function will pair devices and XCLBINsd epending on the number of devices and XCLBINs, will attempt to program all provided XCLBINs according to the following rules:

  • If we have only one FPGA type and one XCLBIN: Program all devices with the same XCLBIN and create one context.
  • If we have only one FPGA type and multiple identical XCLBIN: Program the same number of devices that we have XCLBIN files, but put them in only one context as the XCLBIN will be identical for all programmed devices.
  • If we have multiple type and multiple different XCLBIN, but all targeting the same device: Program all devices with a different XCLBIN and create one context per device/XCLBIN.
  • If we have multiple type and multiple different XCLBIN, and the XCLBIN files target multiple device types: Program each device with a matching XCLBIN and create one context per device/XCLBIN. Some devices might be left un-programmed if no matching XCLBIN is found.
    Parameters
    siThe SystemInfo structure containing information about the devices and XCLBINs available on the system.
    Returns
    StatusCode::SUCCESS if the pairing was successful, or StatusCode::FAILURE otherwise.

Definition at line 261 of file DeviceMgmtSvc.cxx.

261  {
262 
263  // Do we have only one FPGA type?
264  if (si.device_types.size() == 1) {
265 
266  if (m_xclbin_infos.size() == 1) {
267 
268  // We have one or multiple device(s) of the same type and only have one
269  // XCLBIN: Program all device(s) with the same XCLBIN and create one
270  // context.
271  ATH_MSG_DEBUG("Case 1: One or multiple identical device(s), one xclbin");
272  DeviceMgmtSvc::AthClContext ath_cl_context;
273  for (const cl::Device &device : si.device_types[0]) {
274  ath_cl_context.devices.push_back(device);
275  }
276  ath_cl_context.xclbin_info = m_xclbin_infos[0];
277  m_ath_cl_contexts.push_back(ath_cl_context);
278 
279  } else {
280 
281  if (si.different_xclbin_fpga_device_name > 1) {
282 
283  // This is an error: we only have one FPGA type but
284  // XCLBIN files targeting multiple fpga.
286  "Specified XCLBINs target multiple device types, but only one "
287  "device type is present");
288  return StatusCode::FAILURE;
289  }
290 
291  if (si.different_xclbin_count == 1) {
292  // We have multiple device of the same type and multiple identical
293  // xclbin: Program the same number of devices that we have XCLBIN files,
294  // but put them in only one context as the XCLBIN will be identical for
295  // all programmed devices. Some devices might be left un-programmed.
297  "Case 2: Multiple identical devices, multiple identical xclbins");
298  DeviceMgmtSvc::AthClContext ath_cl_context;
299  for (std::size_t i = 0; i < m_xclbin_infos.size(); ++i) {
300  ath_cl_context.devices.push_back(si.device_types[0][i]);
301  }
302  ath_cl_context.xclbin_info = m_xclbin_infos[0];
303  m_ath_cl_contexts.push_back(ath_cl_context);
304 
305  } else {
306 
307  // We have multiple device of the same type and multiple different
308  // XCLBIN, but all targeting the same device: Program all devices with a
309  // differnt XCLBIN and create one context per device/XCLBIN. Some
310  // devices might be left un-programmed.
312  "Case 3: Multiple identical devices, multiple different XCLBIN "
313  "files, but targeting the same device type");
314  for (std::size_t i = 0; i < m_xclbin_infos.size(); ++i) {
315  DeviceMgmtSvc::AthClContext ath_cl_context;
316  ath_cl_context.xclbin_info = m_xclbin_infos[i];
317  ath_cl_context.devices.push_back(si.device_types[0][i]);
318  m_ath_cl_contexts.push_back(ath_cl_context);
319  }
320  }
321  }
322  } else {
323 
324  // More tricky (and probably an edge case): we have different
325  // devices types. We will try to pair each device them with a
326  // XCLBIN files based on the device name and XCLBIN XSA name,
327  // and load them in separate contexts.
328  ATH_MSG_DEBUG("Case 4: Multiple different devices, multiple xclbins");
329  std::vector<XclbinInfo> unaffected_xclbin_infos(m_xclbin_infos);
330  for (const std::vector<cl::Device> &device_type : si.device_types) {
331  for (const cl::Device &device : device_type) {
332  DeviceMgmtSvc::AthClContext ath_cl_context;
333  ath_cl_context.devices.push_back(device);
334 
335  // Try to find a matching XCLBIN for this device.
337  bool found = false;
338  for (iter = unaffected_xclbin_infos.begin();
339  iter != unaffected_xclbin_infos.end();) {
340  if (is_xclbin_compatible_with_device(*iter, device)) {
341  ath_cl_context.xclbin_info = *iter;
342  iter = unaffected_xclbin_infos.erase(iter);
343  found = true;
344  break;
345  } else {
346  ++iter;
347  }
348  }
349 
350  // Only keep this combination if we found a matching XCLBIN.
351  if (found) {
352  m_ath_cl_contexts.push_back(ath_cl_context);
353  } else {
354  // If we did not find a matching XCLBIN, we will not program the
355  // device. This is not an error, but we will report it.
356  ATH_MSG_WARNING("No compatible XCLBIN found for device "
357  << get_device_name(device) << " ("
358  << get_device_bdf(device) << ")");
359  }
360  }
361  }
362 
363  for (const XclbinInfo &xclbin_info : unaffected_xclbin_infos) {
364  // Report XCLBIN files that were not affected to a device.
365  // (This could happen for XCLBIN not compatible with any device.)
367  "No compatible device found for XCLBIN: " << xclbin_info.path);
368  }
369  }
370 
371  return StatusCode::SUCCESS;
372 
373 } // DeviceMgmtSvc::pair_devices_and_xclbins()

◆ program_devices()

StatusCode AthXRT::DeviceMgmtSvc::program_devices ( )
private

Program the devices with the XCLBIN files and create contexts.

This function will program the devices with the XCLBIN files and create contexts based on the information in m_ath_cl_contexts. If an incompatible XCLBIN is found for a device, the initialization will fail.

Returns
StatusCode::SUCCESS if the programming was successful, or StatusCode::FAILURE otherwise.

Definition at line 381 of file DeviceMgmtSvc.cxx.

381  {
382 
383  cl_int err = CL_SUCCESS;
384 
385  for (AthClContext &ath_cl_context : m_ath_cl_contexts) {
386 
387  // Create an OpenCL context for the device(s).
388  ath_cl_context.context = std::make_shared<cl::Context>(
389  ath_cl_context.devices, nullptr, nullptr, nullptr, &err);
390  if (err != CL_SUCCESS) {
391  ATH_MSG_ERROR("Failed to create cl::Context");
392  return StatusCode::FAILURE;
393  }
394 
395  // Load XCLBIN file from disk.
396  std::ifstream file;
397  try {
398  file.open(ath_cl_context.xclbin_info.path.c_str(), std::ios::binary);
399  } catch (...) {
400  ATH_MSG_ERROR("Could not open " << ath_cl_context.xclbin_info.path
401  << " for reading");
402  return StatusCode::FAILURE;
403  }
404  std::vector<char> xclbin_buffer((std::istreambuf_iterator<char>(file)),
405  std::istreambuf_iterator<char>());
406 
407  // Wrap XCLBIN data and size in a vector of cl::Program::Binaries.
408  // If we program multiple devices, we need to provide the same
409  // binary for each device.
410  cl::Program::Binaries binary;
411  for (std::size_t i = 0; i < ath_cl_context.devices.size(); ++i) {
412  binary.push_back({xclbin_buffer.data(), xclbin_buffer.size()});
413  }
414 
415  // Create a program from the XCLBIN binary.
416  // Effectively loading the XCLBIN on the device(s).
417  ath_cl_context.program = std::make_shared<cl::Program>(
418  *ath_cl_context.context, ath_cl_context.devices, binary, nullptr, &err);
419  if (err != CL_SUCCESS) {
420  ATH_MSG_ERROR("Failed to create cl::Program");
421  return StatusCode::FAILURE;
422  }
423 
424  // Report what have been done.
425  std::string bdfs = "";
426  for (const cl::Device &device : ath_cl_context.devices) {
427  bdfs += get_device_bdf(device);
428  bdfs += " ";
429  }
430  ATH_MSG_INFO("Loaded " << ath_cl_context.xclbin_info.path << " on "
431  << ath_cl_context.devices.size() << " "
432  << get_device_name(ath_cl_context.devices[0])
433  << " device(s): " << bdfs);
434  }
435 
436  return StatusCode::SUCCESS;
437 
438 } // DeviceMgmtSvc::program_devices

Member Data Documentation

◆ m_ath_cl_contexts

std::vector<AthClContext> AthXRT::DeviceMgmtSvc::m_ath_cl_contexts
private

List of contexts configured for the service.

Definition at line 137 of file DeviceMgmtSvc.h.

◆ m_xclbin_infos

std::vector<XclbinInfo> AthXRT::DeviceMgmtSvc::m_xclbin_infos
private

List of XCLBIN files info configured for the service.

Definition at line 125 of file DeviceMgmtSvc.h.

◆ m_xclbin_path_list

Gaudi::Property<std::vector<std::string> > AthXRT::DeviceMgmtSvc::m_xclbin_path_list
private
Initial value:
{
this,
"XclbinPathsList",
{},
"The list of XCLBIN files to program on FPGAs"}

The list of xclbin files to use.

This is a list of paths to XCLBIN files to load on accelerator devices.

Definition at line 72 of file DeviceMgmtSvc.h.


The documentation for this class was generated from the following files:
grepfile.info
info
Definition: grepfile.py:38
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
AthXRT::DeviceMgmtSvc::m_xclbin_infos
std::vector< XclbinInfo > m_xclbin_infos
List of XCLBIN files info configured for the service.
Definition: DeviceMgmtSvc.h:125
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
AthXRT::DeviceMgmtSvc::get_device_bdf
std::string get_device_bdf(const cl::Device &device) const
Get the BDF (bus:device:function) string of a cl::device.
Definition: DeviceMgmtSvc.cxx:179
AthXRT::DeviceMgmtSvc::inspect_xclbins
StatusCode inspect_xclbins(SystemInfo &si)
Inspect the provided XCLBIN files and fill the SystemInfo structure.
Definition: DeviceMgmtSvc.cxx:90
AthXRT::DeviceMgmtSvc::is_xclbin_compatible_with_device
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.
Definition: DeviceMgmtSvc.cxx:226
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
lumiFormat.i
int i
Definition: lumiFormat.py:85
AthXRT::DeviceMgmtSvc::m_xclbin_path_list
Gaudi::Property< std::vector< std::string > > m_xclbin_path_list
The list of xclbin files to use.
Definition: DeviceMgmtSvc.h:72
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
file
TFile * file
Definition: tile_monitor.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthXRT::DeviceMgmtSvc::get_device_name
std::string get_device_name(const cl::Device &device) const
Get the name of a cl::device.
Definition: DeviceMgmtSvc.cxx:164
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AthXRT::DeviceMgmtSvc::m_ath_cl_contexts
std::vector< AthClContext > m_ath_cl_contexts
List of contexts configured for the service.
Definition: DeviceMgmtSvc.h:137
make_hlt_rep.platform
platform
Definition: make_hlt_rep.py:46
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthXRT::DeviceMgmtSvc::pair_devices_and_xclbins
StatusCode pair_devices_and_xclbins(const SystemInfo &si)
Pair devices and XCLBINs and create contexts.
Definition: DeviceMgmtSvc.cxx:261
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
AthXRT::DeviceMgmtSvc::inspect_devices
StatusCode inspect_devices(SystemInfo &si)
Inspect the available devices and fill the SystemInfo structure.
Definition: DeviceMgmtSvc.cxx:18
AthXRT::DeviceMgmtSvc::program_devices
StatusCode program_devices()
Program the devices with the XCLBIN files and create contexts.
Definition: DeviceMgmtSvc.cxx:381
python.dummyaccess.exists
def exists(filename)
Definition: dummyaccess.py:9