PyTorch adds experimental torch.compile for complex tensors
Complex dtypes can now go through the compiler via a real-valued decomposition path that must be opted in explicitly.
PyTorch has landed experimental support for running complex-valued tensors through torch.compile, a path that previously did not cover those dtypes.
The feature is off by default. Users enable it with a functorch config flag or a short-lived context manager that turns on a complex wrapper. Under that setting, complex tensors are split into pairs of contiguous real tensors so existing compiled ops can handle them. Coverage is incomplete: many operations still fail or are unsupported.
The change matters for workloads that mix complex arithmetic with compilation, including signal processing, physics-informed models, and other domains where complex dtypes are common and graph capture was previously a dead end. Documentation for the complex-number compiler path is already on the main PyTorch docs site. Point of contact for the work is Hameer Abbasi.