Skip to content

Commit

Permalink
fix: skip inaccessible xilinx devices
Browse files Browse the repository at this point in the history
  • Loading branch information
jskimko authored Jul 24, 2024
1 parent f209d83 commit 7e6e6b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/frt/devices/xilinx_opencl_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ class DeviceMatcher : public OpenclDeviceMatcher {
const std::string device_name = device.getInfo<CL_DEVICE_NAME>();
char bdf[32];
size_t bdf_size = 0;
CL_CHECK(clGetDeviceInfo(device.get(), CL_DEVICE_PCIE_BDF, sizeof(bdf), bdf,
&bdf_size));
cl_int rc = clGetDeviceInfo(device.get(), CL_DEVICE_PCIE_BDF, sizeof(bdf), bdf,
&bdf_size);
if (rc != CL_SUCCESS) { return ""; }
const std::string device_name_and_bdf =
Concat({device_name, " (bdf=", bdf, ")"});
LOG(INFO) << "Found device: " << device_name_and_bdf;
Expand Down

0 comments on commit 7e6e6b5

Please sign in to comment.