fused_fftconv2d_options#

fused_fftconv2d_options(allow_reduced_precision=True)#

Return a torch.compile(options=...) dict that enables the lowering.

This is the preferred way to enable the pass. Inductor’s options are applied as a config patch scoped to that one compiled callable, so unlike fused_fftconv2d_lowering it neither mutates global inductor state nor conflicts with a pre_grad_custom_pass registered elsewhere.

Parameters:

allow_reduced_precision (bool) – See FusedFFTConv2dLowering.

Returns:

A dict to pass as torch.compile(..., options=...).

Raises:

ImportError – If subquadratic_ops_torch is not installed.

Return type:

dict[str, Any]

Example

>>> import torch
>>> from nvsubquadratic.ops.fftconv_lowering import fused_fftconv2d_options
>>> compiled = torch.compile(model, options=fused_fftconv2d_options())
>>> out = compiled(x)