Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

docs(geometry): document the RANSAC(compile=True) CPU-then-CUDA artifact crash (#6278) (#6279)

Dmytro Mishkin0bbe07575ab8
diff --git a/kornia/geometry/ransac.py b/kornia/geometry/ransac.py
index 628d07d27..13e252563 100644
--- a/kornia/geometry/ransac.py
+++ b/kornia/geometry/ransac.py
@@ -241,6 +241,12 @@ class RANSAC(nn.Module):
runs the same algorithm with its own random stream: a seeded call is reproducible and leaves every global
generator unchanged, while an unseeded call consumes one global random seed. Its result is not the eager
one. PROSAC sampling and DEGENSAC are not supported.
+ - Known defect: after compiled estimation on the CPU, a later CUDA process sharing the same inductor cache can
+ save a CPU program as its CUDA artifact, and every CUDA process that loads it then crashes with a
+ segmentation fault on its first call. Use a separate ``TORCHINDUCTOR_CACHE_DIR`` per device, or set
+ ``KORNIA_RANSAC_AOT=0`` to skip the artifact. Deleting only ``<TORCHINDUCTOR_CACHE_DIR>/kornia_ransac/``
+ does not help: the next CUDA compile reads the same inductor cache and saves the CPU program again
+ (`#6278 <https://github.com/kornia/kornia/issues/6278>`_).
- A caller's autocast region does not change the estimate.
Args: