The goal is to make the stable ABI target of a compiled PyTorch extension discoverable from the resulting binary.
The design should have the following properties:
- No additional work for extension authors. Using the PyTorch stable headers and optionally setting
TORCH_TARGET_VERSIONshould be sufficient. There should be no extra source file, build-system integration, linker flag, or post-processing step. - Cross-platform. The mechanism should work with ELF, Mach-O, and PE/COFF rather than relying on a format-specific metadata facility.