Skip to content

Commit f6526b1

Browse files
committed
adding a direct estimator for fbp2d_astra
1 parent e9ba749 commit f6526b1

File tree

3 files changed

+4
-24
lines changed

3 files changed

+4
-24
lines changed

httomo_backends/methods_database/packages/backends/httomolibgpu/httomolibgpu.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ recon:
161161
save_result_default: True
162162
padding: False
163163
memory_gpu:
164-
multiplier: None
165-
method: module
164+
multiplier: 1.0
165+
method: direct
166166
SIRT3d_tomobar:
167167
pattern: sinogram
168168
output_dims_change: True

httomo_backends/methods_database/packages/backends/httomolibgpu/supporting_funcs/recon/algorithm.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@
2626
from httomo_backends.cufft import CufftType, cufft_estimate_1d
2727

2828
__all__ = [
29-
"_calc_memory_bytes_FBP2d_astra",
3029
"_calc_memory_bytes_FBP3d_tomobar",
3130
"_calc_memory_bytes_SIRT3d_tomobar",
3231
"_calc_memory_bytes_CGLS3d_tomobar",
33-
"_calc_output_dim_FBP2d_astra",
32+
"_calc_output_dim_FBP2d_astra",
3433
"_calc_output_dim_FBP3d_tomobar",
3534
"_calc_output_dim_SIRT3d_tomobar",
3635
"_calc_output_dim_CGLS3d_tomobar",
@@ -67,15 +66,6 @@ def _calc_output_dim_CGLS3d_tomobar(non_slice_dims_shape, **kwargs):
6766
return __calc_output_dim_recon(non_slice_dims_shape, **kwargs)
6867

6968

70-
def _calc_memory_bytes_FBP2d_astra(
71-
non_slice_dims_shape: Tuple[int, int],
72-
dtype: np.dtype,
73-
**kwargs,
74-
) -> Tuple[int, int]:
75-
# this is GPU-CPU slice-by-slice reconstruction function so it doesn't need a lot of GPU memory
76-
return (1, 0)
77-
78-
7969
def _calc_memory_bytes_FBP3d_tomobar(
8070
non_slice_dims_shape: Tuple[int, int],
8171
dtype: np.dtype,

tests/test_httomolibgpu.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
)
2626
from httomolibgpu.misc.corr import remove_outlier
2727
from httomolibgpu.misc.denoise import total_variation_ROF, total_variation_PD
28-
from httomolibgpu.recon.algorithm import FBP2d_astra, FBP3d_tomobar, SIRT3d_tomobar, CGLS3d_tomobar
28+
from httomolibgpu.recon.algorithm import FBP3d_tomobar, SIRT3d_tomobar, CGLS3d_tomobar
2929
from httomolibgpu.misc.rescale import rescale_to_int
3030

3131
from httomo_backends.methods_database.packages.backends.httomolibgpu.supporting_funcs.misc.morph import *
@@ -730,16 +730,6 @@ def test_sino_360_to_180_memoryhook(
730730
assert percentage_difference <= 35
731731

732732

733-
def test_FBP2d_astra_memory_calc():
734-
# Call memory estimator to estimate memory usage
735-
(estimated_bytes, subtract_bytes) = _calc_memory_bytes_FBP2d_astra(
736-
non_slice_dims_shape=(10, 10),
737-
dtype=np.float32(),
738-
)
739-
assert estimated_bytes == 1
740-
assert subtract_bytes == 0
741-
742-
743733
def test_FBP2d_astra_output_dim():
744734
# Call memory estimator to estimate memory usage
745735
recon_size = 300

0 commit comments

Comments
 (0)