Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

1.2 KB
Raw Blame

The tensor value checks of adjust_gamma, adjust_contrast, solarize, marginal_pdf, histogram and the vertex modes of Boxes used to be skipped on MPS; they now run there, as torch._assert_async from torch 2.13 and as a host read before, and under TorchScript always as a host read. These checks, and those of gaussian_blur2d and the integer mask cast of AugmentationSequential, are now skipped when checks are disabled with disable_checks(), python -O or KORNIA_CHECKS=0 (they used to run regardless, except in gaussian_blur2d). The input-range checks of equalize, equalize3d and equalize_clahe still run then, since they keep the lookup in bounds. All of them are skipped under torch.vmap, which used to fail on the missing batching rule of the assert. Under torch.compile, all but the equalize range checks are also skipped inside torch.func.grad and the other functorch transforms, where they used to run. A float additions of solarize and a tuple sigma of gaussian_blur2d are checked on the CPU whatever the default device; under a CUDA default device an invalid one used to trigger a device-side assert. equalize and equalize3d compile with TorchScript again.