32 subscribers
با برنامه Player FM !
Binding C++ objects to Python
Manage episode 291705913 series 2921809
In this episode, we will discuss how to bind a C++ object in Python? We'll try to answer the following questions: How does pybind11 do it? What's different about how we implement it for Tensor? What are some downsides of the approach?
Note from the future: I recorded and then decided I didn't like my follow up episode about how to preserve PyObjects even when they go dead in Python. Maybe some day!
Further reading:
- Python bindings for Tensor in PyTorch https://github.com/.../csrc/autograd/python_variable.cpp
- pybind11 hash map for maintaining object identity https://github.com/.../inc.../pybind11/detail/internals.h...
- Tensor subclasses don't save their properties https://github.com/pytorch/pytorch/issues/47117
(but the situation here is more complicated than I imply in the podcast)
83 قسمت
Manage episode 291705913 series 2921809
In this episode, we will discuss how to bind a C++ object in Python? We'll try to answer the following questions: How does pybind11 do it? What's different about how we implement it for Tensor? What are some downsides of the approach?
Note from the future: I recorded and then decided I didn't like my follow up episode about how to preserve PyObjects even when they go dead in Python. Maybe some day!
Further reading:
- Python bindings for Tensor in PyTorch https://github.com/.../csrc/autograd/python_variable.cpp
- pybind11 hash map for maintaining object identity https://github.com/.../inc.../pybind11/detail/internals.h...
- Tensor subclasses don't save their properties https://github.com/pytorch/pytorch/issues/47117
(but the situation here is more complicated than I imply in the podcast)
83 قسمت
همه قسمت ها
×












به Player FM خوش آمدید!
Player FM در سراسر وب را برای یافتن پادکست های با کیفیت اسکن می کند تا همین الان لذت ببرید. این بهترین برنامه ی پادکست است که در اندروید، آیفون و وب کار می کند. ثبت نام کنید تا اشتراک های شما در بین دستگاه های مختلف همگام سازی شود.