patch_denoise.gpu.autotune.autotune_batch_size#

patch_denoise.gpu.autotune.autotune_batch_size(method: str, patch_shape: tuple[int, int, int, int], recombination: str, candidates: tuple[int, ...] = (32, 64, 96, 128, 192, 256, 384, 512, 768, 1024), n_trials: int = 5, dtype: dtype = torch.float32, full_time: bool = False, **denoiser_kwargs) int[source]#

Return the fastest batch size for this (GPU, method, patch_shape).

Cached to disk keyed by GPU model + method + patch shape + recombination + dtype + full_time; a repeat run with the same configuration reuses the cached value instead of re-measuring.