httomo.runner.methods_repository_interface.MethodQuery#
- class httomo.runner.methods_repository_interface.MethodQuery(*args, **kwargs)[source]#
An interface to query information about a single method. It is used by the backend wrapper classes to determine required information.
Note: Implementers might get the information from different places, such as YAML files, decorators, etc, and it might also be hardcoded for specific ones.
Methods
__init__
(*args, **kwargs)calculate_memory_bytes
(non_slice_dims_shape, ...)Calculate the memory required in bytes, returning bytes method and subtract bytes tuple
calculate_output_dims
(non_slice_dims_shape, ...)Calculate size of the non-slice dimensions for this method
calculate_padding
(**kwargs)Calculate how much padding is needed for the method, before and after the core, in number of slices
Check for implementation of the method
Get the parameters for the GPU memory estimation
Check if output dimensions change
Return the pattern of the method
padding
()Check if the method requires padding (i.e. is 3D and requires overlap regions in slicing dimension).
Check if this method saves results by default
Check if the output 3D array needs to wap axis 0 and 1 to match httomolib.
- calculate_memory_bytes(non_slice_dims_shape: Tuple[int, int], dtype: dtype, **kwargs) Tuple[int, int] [source]#
Calculate the memory required in bytes, returning bytes method and subtract bytes tuple
- calculate_output_dims(non_slice_dims_shape: Tuple[int, int], **kwargs) Tuple[int, int] [source]#
Calculate size of the non-slice dimensions for this method
- calculate_padding(**kwargs) Tuple[int, int] [source]#
Calculate how much padding is needed for the method, before and after the core, in number of slices
- get_implementation() Literal['cpu', 'gpu', 'gpu_cupy'] [source]#
Check for implementation of the method
- get_memory_gpu_params() GpuMemoryRequirement | None [source]#
Get the parameters for the GPU memory estimation