From ee999620364139a33fc4a7140ee26783ecde98f8 Mon Sep 17 00:00:00 2001 From: Stephan Seitz <stephan.seitz@fau.de> Date: Thu, 12 Mar 2020 13:27:46 +0100 Subject: [PATCH] Fix generate_shared_object if pystencils_autodiff is not installed --- src/pyronn_torch/codegen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pyronn_torch/codegen.py b/src/pyronn_torch/codegen.py index 5f1e96e..97b3763 100644 --- a/src/pyronn_torch/codegen.py +++ b/src/pyronn_torch/codegen.py @@ -154,10 +154,11 @@ try: const float volume_origin_x, const float volume_origin_y, const int detector_size, const float detector_spacing, const float detector_origin); """), # noqa - } +} except Exception as e: import warnings warnings.warn(str(e)) + TorchModule = None def get_pyronn_cuda_kernels(): -- GitLab