π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
docs(core): update stale CI torch version in comments (2.9.1 β 2.14.0) (#4209)
won_seop38478f0ddc2c
diff --git a/kornia/core/_small_linalg.py b/kornia/core/_small_linalg.pyindex 20b2c6677..53fc206a7 100644--- a/kornia/core/_small_linalg.py+++ b/kornia/core/_small_linalg.py@@ -173,12 +173,13 @@ def _inverse_3x3_cross(input: torch.Tensor) -> torch.Tensor:dtype makes this raise rather than return -- torch 2.5.1 has no ``bfloat16`` ``cross`` onMPS, while 2.9.1 does.- ONNX lowering is *not* a reason, measured: ``torch.linalg.cross`` lowers on both torch- versions kornia's CI runs -- 2.5.1 (legacy exporter) and 2.9.1 (legacy and dynamo) -- to- ``Slice``/``Mul``/``Sub``/``Concat``. What neither exporter lowers on either version is+ ONNX lowering is *not* a reason, measured: ``torch.linalg.cross`` lowers on the torch versions+ kornia's CI runs -- 2.5.1 (legacy exporter), 2.9.1 (legacy and dynamo), and 2.14.0 (legacy+ and dynamo). The legacy exporter emits ``Slice``/``Mul``/``Sub``/``Concat``; the dynamo exporter+ emits ``Split`` in place of ``Slice``, on 2.9.1 as on 2.14.0. What neither exporter lowers is``aten::linalg_inv``, which is what :func:`kornia.core.utils._torch_inverse_cast` avoids by- reaching for a closed form in the first place. torch 2.0-2.4 is below the declared floor; CI does not run it- either.+ reaching for a closed form in the first place. torch 2.0-2.4 is below the declared floor; CI+ does not run it either."""col_a = input[..., :, 0]col_b = input[..., :, 1]diff --git a/kornia/core/utils.py b/kornia/core/utils.pyindex 0520f2b5e..6fd3965aa 100644--- a/kornia/core/utils.py+++ b/kornia/core/utils.py@@ -196,9 +196,11 @@ def _inverse_3x3_closed_form(input: torch.Tensor) -> torch.Tensor:# Under tracing/export (legacy ONNX / jit.trace / dynamo ONNX) stick to the plain scalar# adjugate. NOTE the original rationale here -- "whereas ``cross`` may not [lower]" -- does not# hold on the torch versions CI runs: measured, ``torch.linalg.cross`` lowers on 2.5.1 (legacy- # exporter) and on 2.9.1 (both exporters). The split is kept because it is still the safer- # capture path (scalar arithmetic needs no per-dtype kernel at all, and ``cross`` has real- # kernel gaps -- no bfloat16 on MPS in torch 2.5.1), not because ``cross`` fails to export.+ # exporter) and 2.9.1 and 2.14.0 (both exporters). The legacy exporter emits+ # ``Slice``/``Mul``/``Sub``/``Concat``; the dynamo exporter emits ``Split`` in place of ``Slice``,+ # on 2.9.1 as on 2.14.0. The split is kept because it is still the safer capture path (scalar+ # arithmetic needs no per-dtype kernel at all, and ``cross`` has real kernel gaps -- no bfloat16+ # on MPS in torch 2.5.1), not because ``cross`` fails to export.# Collapsing the two branches is a behavior change and belongs in its own PR.return _inverse_3x3_scalar(input)