From 39cc13c2a912de67fd28c930937f0dc1cd441515 Mon Sep 17 00:00:00 2001 From: cedriclim1 Date: Thu, 9 Jul 2026 09:44:19 -0700 Subject: [PATCH] Remove torch.compile from INR ray helpers for Windows compatibility create_batch_rays and integrate_rays were decorated with @torch.compile(mode="reduce-overhead"). Calling them triggers TorchInductor, which needs a C compiler to build its kernel. On Windows runners without MSVC (cl.exe) on PATH this raises InductorError, failing tests/tomography/test_dataset_models.py::TestINRRayMath on windows-latest. Both are trivial tensor ops (a small fill and a single reduction) and reduce-overhead is a no-op on CPU, so eager execution is equivalent and portable across platforms. --- src/quantem/tomography/dataset_models.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/quantem/tomography/dataset_models.py b/src/quantem/tomography/dataset_models.py index 6ede23be..a1a51bad 100644 --- a/src/quantem/tomography/dataset_models.py +++ b/src/quantem/tomography/dataset_models.py @@ -536,7 +536,6 @@ def get_coords( return all_coords @staticmethod - @torch.compile(mode="reduce-overhead") def create_batch_rays( pixel_i: torch.Tensor, pixel_j: torch.Tensor, N: int, num_samples_per_ray: int ) -> torch.Tensor: @@ -599,7 +598,6 @@ def transform_batch_rays( return transformed_rays @staticmethod - @torch.compile(mode="reduce-overhead") def integrate_rays( rays: torch.Tensor, num_samples_per_ray: int, target_values_len: int ) -> torch.Tensor: