resolve_fused_fft_size#
- resolve_fused_fft_size(x_dim, y_dim, k_x, k_y, fft_size=None)#
Pick the FFT tile size for a fused 2D conv, or validate an explicit one.
The tile must satisfy two constraints simultaneously:
fft_size // 2 >= max(x_dim, y_dim)— the kernel’s own input cap.fft_size // 2 >= ceil(k / 2)per axis — headroom for the top/left pre-pad offft_size // 2 - k // 2that realigns the crop with the torch reference (see the section header).
- Parameters:
- Returns:
A tile size drawn from
(8, 16, 32, 64, 128).- Raises:
ValueError – If no admissible tile exists (shape too large for the fused kernel), or if an explicit
fft_sizeis not in the supported set or is too small for the given shapes.- Return type: