Skip to content

Commit 1190f34

Browse files
committed
version bump, reformatting
1 parent 5e493f0 commit 1190f34

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,7 @@ def _calc_memory_bytes_LPRec3d_tomobar(
220220

221221
tmp_p_input_slice = angles_tot * n * np.float32().itemsize
222222

223-
padded_tmp_p_input_slice = (
224-
angles_tot * (n + padding_m * 2) * np.float32().itemsize
225-
)
223+
padded_tmp_p_input_slice = angles_tot * (n + padding_m * 2) * np.float32().itemsize
226224
rfft_plan_slice_size = (
227225
cufft_estimate_1d(
228226
nx=n + padding_m * 2,
@@ -319,7 +317,6 @@ def add_to_memory_counters(amount, per_slice: bool):
319317

320318
add_to_memory_counters(-irfft_result_size / chunk_count, True)
321319

322-
323320
add_to_memory_counters(-padded_in_slice_size, True)
324321
add_to_memory_counters(-filter_size, False)
325322
add_to_memory_counters(-rfftfreq_size, False)
@@ -344,7 +341,7 @@ def add_to_memory_counters(amount, per_slice: bool):
344341
add_to_memory_counters(circular_mask_size, False)
345342
add_to_memory_counters(after_recon_swapaxis_slice, True)
346343

347-
return (tot_memory_bytes * 1.05, fixed_amount + 250 * 1024 *1024)
344+
return (tot_memory_bytes * 1.05, fixed_amount + 250 * 1024 * 1024)
348345
# return (tot_memory_bytes, fixed_amount)
349346

350347

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dev_template = "{tag}"
2424

2525
[project]
2626
name = "httomo-backends"
27-
version = "0.5"
27+
version = "0.5.1"
2828
description = "Supplementary files for HTTomo backends."
2929
readme = "README.rst"
3030
license = {text = "BSD-3-Clause"}

tests/test_httomolibgpu.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ def test_recon_FBP3d_tomobar_memoryhook(
584584
# @pytest.mark.parametrize("slices", [15])
585585
# @pytest.mark.parametrize("projection_angle_range", [(0, np.pi)])
586586

587+
587588
@pytest.mark.parametrize("projections", [1500, 1801, 2560])
588589
@pytest.mark.parametrize("detX_size", [2560])
589590
@pytest.mark.parametrize("slices", [3, 4, 5, 10, 15, 20])
@@ -593,8 +594,12 @@ def test_recon_FBP3d_tomobar_memoryhook(
593594
# @pytest.mark.parametrize("detX_size", [2560])
594595
# @pytest.mark.parametrize("slices", [3, 4, 5, 10])
595596
# @pytest.mark.parametrize("projection_angle_range", [(0, np.pi)])
596-
def test_recon_LPRec3d_tomobar_0_pi_memoryhook(slices, detX_size, projections, projection_angle_range, ensure_clean_memory):
597-
__test_recon_LPRec3d_tomobar_memoryhook_common(slices, detX_size, projections, projection_angle_range, ensure_clean_memory)
597+
def test_recon_LPRec3d_tomobar_0_pi_memoryhook(
598+
slices, detX_size, projections, projection_angle_range, ensure_clean_memory
599+
):
600+
__test_recon_LPRec3d_tomobar_memoryhook_common(
601+
slices, detX_size, projections, projection_angle_range, ensure_clean_memory
602+
)
598603

599604

600605
@pytest.mark.full
@@ -640,11 +645,10 @@ def __test_recon_LPRec3d_tomobar_memoryhook_common(
640645
kwargs["recon_size"] = detX_size
641646
kwargs["recon_mask_radius"] = 0.8
642647

643-
644648
hook = MaxMemoryHook()
645649
hook2 = PeakMemoryLineProfileHook(["methodsDIR_CuPy.py"])
646650
with hook, hook2:
647-
# with hook:
651+
# with hook:
648652
recon_data = LPRec3d_tomobar(cp.copy(data), **kwargs)
649653
# hook2.print_report()
650654

0 commit comments

Comments
 (0)