fovi.arch.knn_optimization
Optimized backends for KNNConvLayer (inference and training).
All paths exploit the fact that local_rf is one-hot: each KNN neighbor selects exactly one
reference-grid weight. Inference-only backends (torch_cached/warp_cached/warp_memory)
cache derived operands keyed on the weight version. Training-capable backends
(torch_scatter/torch_compact, plus kernel backends registered in
fovi.arch.knn_autograd) provide autograd-correct forward/backward and are selected when
gradients are enabled.
- fovi.arch.knn_optimization._is_gather_gemm_layer(layer) bool[source]
K=1/V=1 layers (resnet-style downsample convs) degenerate to gather + one dense GEMM.
- fovi.arch.knn_optimization._native_cuda_supported(device: device) bool[source]
Return whether the fused convolution kernel supports this CUDA device.