Skip to content

SYSTEM Cited by 1 source

torch.compile

Definition

torch.compile is PyTorch's built-in compiler that "automatically rewrites a PyTorch model into more efficient GPU kernel code" (Source: sources/2026-05-26-meta-silvertorch-index-as-model-a-new-retrieval-paradigm-for-recommendation-systems). It traces the model into an FX graph, then lowers via the Inductor backend into fused CUDA / Triton kernels for execution.

This page is a minimal wiki stub; torch.compile is referenced across the wiki primarily as a performance substrate that recsys-serving + LLM-serving teams inherit by writing pure PyTorch.

Role in SilverTorch

A load-bearing argument in Meta's SilverTorch post is that "because the whole system reduces to a single PyTorch model, we get to benefit from the broader AI industry's work on making PyTorch models faster, like PyTorch's own torch.compile that automatically rewrites a PyTorch model into more efficient GPU kernel code. Every advance in that ecosystem improves SilverTorch's serving performance."

This is the structural payoff of the unified-PyTorch-model-as-retrieval-system pattern: substrate-level optimisations land once in the PyTorch ecosystem and propagate to every SilverTorch primitive (ANN search, Bloom filter, scoring, reranker) without per-component porting.

Relationship to KernelEvolve

Meta's KernelEvolve (Source: sources/2026-04-02-meta-kernelevolve-how-metas-ranking-engineer-agent-optimizes-ai-infrastructure) treats torch.compile + vendor libraries as the baseline against which agentic kernel synthesis competes — the "+60% inference throughput improvement" on the Andromeda retrieval model is over a torch.compile + vendor-library baseline. The two systems compose: torch.compile is the default optimisation path; KernelEvolve is the agentic search layer for kernels where torch.compile leaves significant performance on the table.

Caveats

  • The 2026-05-26 SilverTorch post is the canonical first wiki disclosure as a named optimisation substrate; this page does not yet detail the Dynamo / AOTAutograd / Inductor pipeline internals. See the PyTorch documentation for those.

Seen in

Last updated · 542 distilled / 1,571 read