Skip to content

Commit

Permalink
a fix to #437
Browse files Browse the repository at this point in the history
  • Loading branch information
dkazanc committed Sep 11, 2024
1 parent 92ec62e commit 46dd6a2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions httomo/runner/task_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def determine_max_slices(self, section: Section, slicing_dim: int):

data_shape = self.source.chunk_shape
max_slices = data_shape[slicing_dim]

# loop over all methods in section
has_gpu = False
for idx, m in enumerate(section):
Expand Down Expand Up @@ -332,6 +332,10 @@ def determine_max_slices(self, section: Section, slicing_dim: int):

max_slices_methods = [max_slices] * len(section)

# NOTE: as the convertion of the raw data from uint16 to float32 happens after the data gets loaded,
# we should consider self.source.dtype to be float for memeory estimators. This should change later
# when the direct memory estimators will be able to tackle the change of data type.

# loop over all methods in section
for idx, m in enumerate(section):
if len(m.memory_gpu) == 0:
Expand All @@ -340,7 +344,7 @@ def determine_max_slices(self, section: Section, slicing_dim: int):

output_dims = m.calculate_output_dims(non_slice_dims_shape)
(slices_estimated, available_memory) = m.calculate_max_slices(
self.source.dtype,
np.dtype('float32'), # self.source.dtype, # see the NOTE about the dtype above
non_slice_dims_shape,
available_memory,
)
Expand Down

0 comments on commit 46dd6a2

Please sign in to comment.