π Geometric Computer Vision Library for Spatial AI
HardNet, HardNet8, SOSNet, TFeat, HyNet, LAFAffNetShapeEstimator and OriNet now run their convolutions in
channels-last memory layout where that is faster, also when scripted with TorchScript (LAFAffNetShapeEstimator does
not script): on MPS in float32 and float16, where their convolution bodies are 1.04-1.38x faster on an Apple M1; on CUDA
in float16 and bfloat16, where their forwards on 2048 patches are 1.08-1.44x faster on an RTX 4090; and on CPU in
float32 when torch is built with oneDNN, where they are 1.2-1.5x faster on an x86 i7-14700K (HardNet8 gains only at
the default thread count). CUDA float32 keeps the default layout, which is faster there. HardNet used to convert on
every CPU float32 build, including the macOS arm64 wheels, whose NNPACK convolutions take only the default layout, so
the conversion was a copy that changed nothing. Outputs agree up to rounding: bitwise on MPS, and within the dtype's
rounding on x86 CPUs and on CUDA.