From b5fee64e4761cd8fd0ae4949864212808b883f21 Mon Sep 17 00:00:00 2001 From: Yousef Moazzam Date: Mon, 11 May 2026 11:31:08 +0100 Subject: [PATCH] Remove halving of `--max-memory` value This is a leftover from when there was only GPU memory estimation (the max slices estimation for GPU methods) in the framework and no CPU memory estimation (the dataset store backing calculation, choosing between RAM or an hdf5 file). The max slices estimators of GPU methods all take into account the output as well as the input needing to be stored in GPU memory, so there's no need to halve the `--max-memory` value in order to account for the size of the input and output of a section - the GPU method memory estimators already account for this. The CPU memory estimation in the dataset store backing calculator accounts for the output chunk that will be written by a section in addition to the input chunk being read by a section, so in the CPU memory case there's also no need to do the halving of the `--max-memory` value. --- httomo/cli.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/httomo/cli.py b/httomo/cli.py index 45f756c6a..97f1711b5 100644 --- a/httomo/cli.py +++ b/httomo/cli.py @@ -469,9 +469,6 @@ def execute_high_throughput_run( reslice_dir: PathLike, save_snapshots: bool, ) -> None: - # we use half the memory for blocks since we typically have inputs/output - memory_limit = transform_limit_str_to_bytes(max_memory) // 2 - _set_gpu_id(gpu_id) # Run the pipeline using Taskrunner, with temp dir or reslice dir @@ -483,7 +480,7 @@ def execute_high_throughput_run( Path(tmp_dir), global_comm, monitor=mon, - memory_limit_bytes=memory_limit, + memory_limit_bytes=transform_limit_str_to_bytes(max_memory), save_snapshots=save_snapshots, ) runner.execute()