torch-radon icon indicating copy to clipboard operation
torch-radon copied to clipboard

Status of version 2

Open mareikethies opened this issue 2 years ago • 6 comments

Hi, I was wondering about version 2 of this library. Do you have any plans about when you are going to release it? Currently, I am having troubles with the torch.fft modules of version 1, but the v2 branch does not build for me. Any hints would be appreciated. Thanks for your help!

mareikethies avatar Aug 11 '22 07:08 mareikethies

error_torch_radon

faebstn96 avatar Aug 11 '22 08:08 faebstn96

These structs are defined in the CUDA headers, but were not included. The following patch will fix the build, but not installation of v2.

diff --git a/include/parameter_classes.h b/include/parameter_classes.h
index b42ad3f..fda3aee 100644
--- a/include/parameter_classes.h
+++ b/include/parameter_classes.h
@@ -4,6 +4,7 @@
 
 #include "defines.h"
 #include "vectors.h"
+#include "vector_types.h"
 
 struct VolumeCfg
 {
@@ -100,4 +101,4 @@ public:
     dim3 get_grid_size(int x, int y = 1, int z = 1) const;
 
     int get_channels(int batch_size) const;
-};
\ No newline at end of file
+};
diff --git a/make.py b/make.py
index 606977b..d4f41c7 100644
--- a/make.py
+++ b/make.py
@@ -52,7 +52,7 @@ def build(compute_capabilities=(60, 70, 75, 80, 86), debug=False, cuda_home="/us
 
     cuda_version = get_cuda_version(cuda_home)
     nvcc = f"{cuda_home}/bin/nvcc"
-    include_dirs = ["./include"]
+    include_dirs = ["./include", os.path.join(cuda_home, "include")]
     intermediate_dir = "intermediates"
 
     # compute capabilities >= 80 are only for cuda >= 11

carterbox avatar Aug 11 '22 16:08 carterbox

Thanks @carterbox this did fix the build. As you already said, some imports now fail at runtime:

from .cuda_backend import VolumeCfg ImportError: cannot import name 'VolumeCfg' from 'torch_radon.cuda_backend'

I will probably go back to v1 and update the fft imports to work with the recent pytorch versions.

mareikethies avatar Aug 12 '22 07:08 mareikethies

Hi everyone, sorry for having been inactive but I have been very busy with work. I will try to clean up and finish version 2 in the next weeks. Hopefully I will be able to fix this compilation error during this weekend.

Best, Matteo

matteo-ronchetti avatar Aug 12 '22 08:08 matteo-ronchetti

Hi @matteo-ronchetti, Do you already have any updates on version 2? Thank you so much for your great repo!

Best Fabian

faebstn96 avatar Sep 08 '22 08:09 faebstn96