policy=pybind11::return_value_policy::automatic_reference, Args=<pybind11::object &, pybind11::str, pybind11::int_>]" /global/u1/n/namehta4/libtorch/include/pybind11/pytypes.h(976): here instantiation of "pybind11::str pybind11::str::format(Args &&...) const...
@JiashuGuoAs far i knowTypeError: pybind11::init(): factory function returned nullptris related to GPU. Thanks! I tried simple float model conversion, which works without any issues. We will check the root-cause of this error. Thanks!
Issue description When pybind11 casts from python->C++ for a function call, the casters for each argument are kept alive for the duration of the function call. This is important when passing a pointer or reference to memory owned by the ...
#include <pybind11/pybind11.h> namespace py = pybind11; using namespace pybind11::literals; PYBIND11_MODULE(example, m) { m.def("func1", [](py::object func_to_call){}, "docstring", "func_to_call"_a=nullptr); m.def("func2", [](py::function func_to_call){}, "docstring"...
Could you please try to move the exception translator code into its own header, maybe pybind11/detail/exception_translators.h? You'll have to update a couple files when adding a new header. An easy way to pin-point the locations is e.g.: $ git grep detail/value_and_holder.h CMakeLis...
this is probably a problem with your build env, maybe you are not compiling for the right arch malfet added module: arm and removed topic: build labels Oct 6, 2023 Author MadhuriPatil1694 commented Oct 9, 2023 its build from source successfully using steps git clone https://github.com...
If I do not import it the code crashes when it tries to create the numpy array in the pybind11 module Collaborator bstaletic commented Sep 14, 2020 That is weird. Try wrapping your code in try{}catch(py::error_already_set& e) {} and see what the actual exception contains. There ...
What version (or hash if on master) of pybind11 are you using? master Problem description When using cmake, the third-party library has interdependence and an error occurs. Looking forward to your reply. Errors: /usr/bin/ld: /home/xxx/lib/libobjMesh.a(objMesh.o): warning: relocation ...
#include <pybind11/pybind11.h> struct PureVirtual { virtual ~PureVirtual() = default; virtual void method() = 0; }; struct PyPureVirtual : PureVirtual { void method() override { PYBIND11_OVERRIDE_PURE(void, PureVirtual, method); } }; PYBIND11_MODULE(segfaulty, mod) { namespace py ...
pybind11-stubgen/pybind11_stubgen/__init__.py Lines 93 to 103 in f14583b if FunctionSignature.signature_downgrade: self.name = name self.args = "*args, **kwargs" self.rtype = "typing.Any" lvl = logging.WARNING if FunctionSignature.ignore_invalid_signature else logging.ERROR ...