From 0dd171c1ba08b08bbdcf80992013d732fb007c89 Mon Sep 17 00:00:00 2001 From: Andrew Bolin <20331461+andrew-bolin@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:22:58 +1000 Subject: [PATCH] Release Python GIL during slow load I/O --- src/python/pybind11/src/pyxrt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/python/pybind11/src/pyxrt.cpp b/src/python/pybind11/src/pyxrt.cpp index 8f586f0cfbb..19e36e57759 100644 --- a/src/python/pybind11/src/pyxrt.cpp +++ b/src/python/pybind11/src/pyxrt.cpp @@ -129,9 +129,11 @@ PYBIND11_MODULE(pyxrt, m) { return new xrt::device(bfd); })) .def("load_xclbin", [](xrt::device& d, const std::string& xclbin) { + py::gil_scoped_release release; return d.load_xclbin(xclbin); }, "Load an xclbin given the path to the device") .def("load_xclbin", [](xrt::device& d, const xrt::xclbin& xclbin) { + py::gil_scoped_release release; return d.load_xclbin(xclbin); }, "Load the xclbin to the device") .def("register_xclbin", [](xrt::device& d, const xrt::xclbin& xclbin) {