Listen "Binding C++ objects to Python"
Episode Synopsis
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.cpppybind11 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)
More episodes of the podcast PyTorch Developer Podcast
Compiler collectives
04/08/2024
TORCH_TRACE and tlparse
29/04/2024
Higher order operators
21/04/2024
Inductor - Post-grad FX passes
12/04/2024
CUDA graph trees
24/03/2024
Min-cut partitioner
17/03/2024
AOTInductor
02/03/2024
Tensor subclasses and PT2
24/02/2024
Compiled autograd
19/02/2024
PT2 extension points
05/02/2024
ZARZA We are Zarza, the prestigious firm behind major projects in information technology.