FusedFFTConv2dLowering#

class FusedFFTConv2dLowering(allow_reduced_precision=True)#

Bases: CustomGraphPass

Inductor 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). Set False to 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_torch is not installed.

uuid()#

Cache key contribution, so inductor never reuses artifacts across changes here.

Hashing this file’s contents means any edit to the matcher invalidates cached artifacts without anyone remembering to bump a version string.

Return type:

bytes