π Geometric Computer Vision Library for Spatial AI
float16 and bfloat16 geometry warps now build their sampling grid and sample in float32 and return the input dtype on
every device, not only on CPU (#5814): warp_affine, warp_perspective, remap, homography_warp with
normalized_homography=False and the 3D warps, and the crops and augmentations built on them. On CUDA and MPS they used
to compute in the half dtype: a bfloat16 warp_affine of a 256 px [0, 1] image was off by up to 0.98 on CUDA and on
MPS, warp_affine3d raised for a half CUDA or MPS output with a size-1 axis, and a bfloat16 warp inside a float16
torch.autocast raised. HomographyWarper, homography_warp with normalized_homography=True (in normalized or pixel
coordinates), elastic_transform2d, warp_image_tps and the depth warps also sample in float32 now, but they still
build their grid in the half dtype, so their float16 and bfloat16 accuracy is not fixed yet; that part of #5814 remains
open.