Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

739 B
Raw Blame

Under torch.compile, ALIKED.forward and forward_laf on the CPU ask for the default feature-map layout again. Eager keeps the channels_last map of #6498. Inductor (torch 2.14, x86) lowers the descriptor head's grid_sample to a channel-by-channel gather that the channels_last map slows down, and it transposed the normalised map into its channels_last store. On an i7-14700K, the compiled forward of a 416 x 640 image took 260 ms with the map. It now takes 203 ms with static shapes, and 172 ms instead of 201 ms with dynamic=True. With channels_last=True, extract_dense_map now normalises in an explicit (B, H, W, C) tensor. Eager gets the same bits, and inductor gets a pixel-major store. Eager, CUDA and MPS are unchanged.