LibTorch backend for eager execution #
This umbrella collects TorchLean's LibTorch adapter, currently targeting CUDA devices.
The modules separate native execution from the tape and proof-facing contracts:
TrustedandBufferexpose the opaque FFI buffer type and allocation/copy primitives.Controlsexposes precision, determinism, SDP, device, allocator, and version controls.KernelsandConvPooldeclare the LibTorch CUDA entrypoints.TapeandOpsbuild the CUDA reverse-mode tape over those buffers.Float32ContractandKernelSpecstate the proof layer reference contracts for native bits.
The LibTorch bridge executes without recording a LibTorch autograd graph. TorchLean keeps tape traversal and selected local VJPs. Lean proves the pure specs and graph-level connections; runtime controls and tests do not prove the compiled native implementation.