Skip to content

Commit 791b27f

Browse files
committed
modifies test slightly
1 parent 33a28d2 commit 791b27f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/test_httomolibgpu.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -573,15 +573,17 @@ def test_recon_FBP_memoryhook(
573573

574574

575575
@pytest.mark.cupy
576-
@pytest.mark.parametrize("slices", [2, 4])
576+
@pytest.mark.parametrize("slices", [2, 3, 4, 5, 10, 15])
577577
def test_recon_LPRec_memoryhook(slices, ensure_clean_memory):
578-
data = cp.random.random_sample((1801, slices, 2560), dtype=np.float32)
578+
angles_number = 1801
579+
detX_size = 2560
580+
data = cp.random.random_sample((angles_number, slices, detX_size), dtype=np.float32)
579581
kwargs = {}
580582
kwargs["angles"] = np.linspace(
581583
0.0 * np.pi / 180.0, 180.0 * np.pi / 180.0, data.shape[0]
582584
)
583-
kwargs["center"] = 500
584-
kwargs["recon_size"] = 2560
585+
kwargs["center"] = 1280
586+
kwargs["recon_size"] = detX_size
585587
kwargs["recon_mask_radius"] = 0.8
586588

587589
hook = MaxMemoryHook()
@@ -595,7 +597,7 @@ def test_recon_LPRec_memoryhook(slices, ensure_clean_memory):
595597

596598
# now we estimate how much of the total memory required for this data
597599
(estimated_memory_bytes, subtract_bytes) = _calc_memory_bytes_LPRec(
598-
(1801, 2560), dtype=np.float32(), **kwargs
600+
(angles_number, detX_size), dtype=np.float32(), **kwargs
599601
)
600602
estimated_memory_mb = round(slices * estimated_memory_bytes / (1024**2), 2)
601603
max_mem -= subtract_bytes

0 commit comments

Comments
 (0)