Skip to content

Convolution perf notes #2

Description

@jamienoss

Perf boosts

Other Issues

  • convolve() param boundary has default 'fill' whilst doc states default is None. Since the default for fill_value = 0. the two are effectively the same. However, if the user accidentally changes the fill_value this value will be used as boundary=None is NOT the actual default and the internal routine convolve<N>d_boundary_fill() is called and not convolve<N>d _boundary_none(). c.f. Direct conv boundary default - None or fill #10
  • The doc for convolve() states that an exception will be raised for nan_treatment='interpolate' if the kernel sums to zero and therefore cannot be normalized. This is not actually true, no exception is raised. Note: not yet tested, code inspection only.

Activity

  1. changed the title [-]small perf notes extract from #1[/-] [+]Convolution perf notes[/+] on Jan 29, 2018
  2. added a commit that references this issue on Feb 6, 2018
    830562c
  3. jamienoss commented on Feb 6, 2018

    @jamienoss
    OwnerAuthor

    Note to self: with all perf changes implemented for boundary=None and with a 10kx10k image (no NaNs present) and 111x111 kernel, the new runtime is ~18min compared to ~25, that's ~40% faster!
    All other defaults were used, i.e. nan_treatment='interpolate' and normalize_kernel=True.

    With a single NaN present, the runtimes are pretty much the same. Only a small 4.4% speed up, which may be within the noise (only ran once at this point).

    The 40% is still true when NaN present but nan_treatment='fill'.

  4. added a commit that references this issue on Feb 6, 2018
    389971b
  5. Repository owner locked and limited conversation to collaborators on Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions