New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a cuFFT plan cache #3730
Merged
Merged
Add a cuFFT plan cache #3730
Changes from 42 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
7eb8985
[WIP] checking in...
leofang 3cdd1f2
[WIP] a very simple LRU
leofang e91cc6e
[WIP] separate linked list from the cache object; improve
leofang 4224ad2
refactored a bit, seems complete
leofang ea26609
add thread-local storage and helpers from scipy/scipy#12512
leofang 4863ce6
relax size/memsize constraints; add is_enabled flag (WIP)
leofang d7e65f1
add TODOs
leofang 62f5699
hook up the cache with fft modules; all tests passed
leofang d7d8cbd
bug fix: forgot to cache the plans...
leofang 011222c
fixes for 1. empty plan, 2. multi-gpu plan
leofang 2ad410b
[WIP] per-device cache
leofang 737d0ab
per-thread, per-device cache!
leofang 583826d
expose scipy apis to cp.fft.config; fix flake8
leofang 561085e
couple get_fft_plan to cache
leofang 3838bc5
fix flake8
leofang a613866
support caching multi-gpu plans
leofang 7ba50ae
fix flake8
leofang 24c7c64
order class methods (def -> cdef -> cpdef)
leofang 2d157fc
traverse the list from the end
leofang e123b51
fix ordering
leofang 49fcccd
refactor to simplify PlanCache usage, see below
leofang edc958f
add show_plan_cache_info(); nicer formatting
leofang d1eb466
add simple tests
leofang d8f09ef
[WIP] add cache tests
leofang 763e2b2
improve tests
leofang 21d8440
fix multi-gpu removal bug; more tests
leofang faad22a
fix flake8
leofang dac7cb0
more tests
leofang 2b40d6f
test bug fixed
leofang 0f16c04
Merge branch 'master' into cufft_cache
leofang 4bb33b7
ensure multi-gpu memsize is properly set
leofang 79e061b
minor clean-up
leofang 4f91e6e
decouple get_fft_plan from cache
leofang 40565d4
add docstring to PlanCache
leofang 8fa3a9a
add a few Sphinx links
leofang f482f06
update docstring
leofang 06dcb25
one more test
leofang 2d3a94b
try documenting PlanCache?
leofang 495a116
nitpick: ensure _get_plan_memsize() always gets the device (not neces…
leofang 90c5081
Apply suggestions from code review
leofang 4a55a84
add memsize test
leofang c4c8549
work around cuda 11 bug
leofang 8ccafd6
Merge branch 'master' into cufft_cache
leofang e70bd05
Merge branch 'master' into cufft_cache
leofang b8218d6
make the cache module private
leofang 590647b
fix _util
leofang 13b2686
fix docs
leofang bfd1de7
record hits/misses
leofang 8d0705c
add cleanup routine to break circular ref
leofang 3784845
use weakref
leofang File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be
collections.abc.Iterable
to match the ValueError message below, but I think it is probably best to keep it as-is so we don't allow iterables likecupy.ndarray
.