Name Date Size #Lines LOC

..--

README.mdH A D25-Apr-2025592 117

init.cppH A D25-Apr-202512.8 KiB342291

init.hH A D25-Apr-2025249 139

python_util.cppH A D25-Apr-20251.5 KiB5650

python_util.hH A D25-Apr-2025340 1611

README.md

1# Lazy Tensor Python Code
2
3Lazy Tensor Core is part of libtorch, which can not depend on python.
4
5Parts of lazy tensor core use python for 2 purposes
6A) py bindings let python programs call into lazy tensor c++ code
7B) lazy tensor core calls into python to use it (e.g. for grabbing stack traces)
8
9(A) is trivial since the python bindings only depend on libtorch;
10(B) requires making libtorch_python register a function with libtorch if loaded, and having a default (no-op) function otherwise.  Any functionality that strictly needs to depend on python should be part of the 'python' folder.
11