Skip to main content

Module extract

Module extract 

Source
Expand description

PyTorch kernel extraction — reads Python source, extracts equations.

Parses docstrings for LaTeX math, extracts preconditions from type hints and assertions, and generates YAML contract skeletons.

Structs§

ExtractedEquation
Extracted equation from PyTorch source.
ExtractedKernel
Extracted kernel from a PyTorch source file.

Functions§

extract_from_pytorch
Extract a kernel from a PyTorch Python source file.
kernel_to_yaml
Generate YAML contract from extracted kernel.