Skip to content

Commit

Permalink
#5 out of memory for 1x when trying to use more than 1 gb of internal…
Browse files Browse the repository at this point in the history
… memory (due to extremely large gaussian kernel)
  • Loading branch information
carljohnsen committed Apr 10, 2024
1 parent c3cfb0c commit d5ab408
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/processing_steps/0900_generate_gauss_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ def gauss_kernel(sigma):

gigabyte = 1024**3
gigabyte_internal = gigabyte / np.dtype(internal_type).itemsize
n_layers = int(np.floor((10 * gigabyte_internal) / (ny*nx)))
n_layers = int(np.floor((1 * gigabyte_internal) / (ny*nx)))
n_layers = min(n_layers, nz)
n_layers = 100

if verbose >= 1:
print(f"Repeated Gauss blurs ({reps} iterations, sigma_voxels={sigma_voxels}, kernel length={kernel.shape} coefficients)")
Expand Down

0 comments on commit d5ab408

Please sign in to comment.