FusedFFTConv2dLowering#
- class FusedFFTConv2dLowering(allow_reduced_precision=True)#
Bases:
CustomGraphPassInductor pre-grad pass replacing the 2D FFT-conv chain with the fused kernel.
Install it with
fused_fftconv2d_lowering(), which handles the inductor config plumbing and restores any previously registered pass on exit.- Parameters:
allow_reduced_precision (bool) – When
True(default) fp16/bf16 graphs are rewritten too, which changes the convolution from fp32-internal to native-dtype — the main source of the speedup, and a real numerics change (~2e-3 normwise in bf16). SetFalseto restrict the rewrite to fp32 graphs, where it is numerically neutral.
- __init__(allow_reduced_precision=True)#
Build the pass and force the fused kernel’s operators to register.
- Parameters:
allow_reduced_precision (bool) – See the class docstring.
- Raises:
ImportError – If
subquadratic_ops_torchis not installed.