Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

635 B
Raw Blame

bilateral_blur and joint_bilateral_blur take each window sum in one reduction again on the CPU and CUDA. In 0.9.0 they summed over the kernel's columns and then its rows, which rounded every partial sum to the input dtype and made float16 and bfloat16 gradients with respect to a tensor sigma_color or sigma_space up to about six times less accurate (float16 sigma_color: a relative error of 7.5e-2 instead of 1.3e-2). MPS keeps the two-step sum, which is much faster there, so on MPS those half-precision gradients stay less accurate; pass a float32 input there when they matter, since tensor sigmas take the input's dtype.