Skip to content

Add choose_conv_method - #3464

Merged
asi1024 merged 7 commits into
cupy:masterfrom
Dahlia-Chehata:choose_conv_method
Jun 25, 2020
Merged

asi1024 merged 7 commits into
cupy:masterfrom
Dahlia-Chehata:choose_conv_method

Conversation

@Dahlia-Chehata

@Dahlia-Chehata Dahlia-Chehata commented Jun 20, 2020 •

Copy link
Copy Markdown
Contributor

This PR blocks #3371.
It is an implementation of scipy.signal.choose_conv_method (supporting only 1D inputs currently). One difference from SciPy's behaviour is that it always chooses direct convolution for signed/unsigned integers

@kmaehashi kmaehashi added this to the v8.0.0b4 milestone Jun 22, 2020
Comment thread cupyx/scipy/signal/signaltools.py Resolved
Comment thread cupyx/scipy/signal/signaltools.py Resolved
Comment thread cupyx/scipy/signal/signaltools.py Resolved
Comment thread cupyx/scipy/signal/signaltools.py Outdated
"""
fft_ops, direct_ops = _conv_ops(x.size, h.size, mode)
offset = -1e-3
constants = {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain what this constants are. I'm wondering these constants are useful also for GPU computations.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These constants for SciPy were determined using code from https://github.com/stsievert/scipy-convolve-timings as discussed at: scipy/scipy#11031 (comment)

I expect running the same sort of thing on the GPU might give substantially different results. I am not sure how feasible it is to get a single set of numbers that applies in general across a wide range of GPUs, but a single set based on a given GPU would probably still be a better match than these existing CPU-based constants.

Comment thread cupyx/scipy/signal/signaltools.py Resolved
@asi1024 asi1024 mentioned this pull request Jun 22, 2020
@asi1024 asi1024 added the cat:feature New features/APIs label Jun 22, 2020
Comment thread cupyx/scipy/signal/signaltools.py Resolved
Comment thread cupyx/scipy/signal/signaltools.py Resolved
Comment thread cupyx/scipy/signal/signaltools.py Resolved
@asi1024 asi1024 modified the milestones: v8.0.0b4, v8.0.0b5 Jun 24, 2020
@asi1024

asi1024 commented Jun 24, 2020

Copy link
Copy Markdown
Member

Jenkins, test this please.

@pfn-ci-bot

Copy link
Copy Markdown
Collaborator

Successfully created a job for commit 870b523:

@chainer-ci

Copy link
Copy Markdown
Member

Jenkins CI test (for commit 870b523, target branch master) succeeded!

@emcastillo emcastillo modified the milestone: v8.0.0b5 Jun 25, 2020
@asi1024

asi1024 commented Jun 25, 2020

Copy link
Copy Markdown
Member

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:feature New features/APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants