Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

[RELEASE] cusignal v0.14 #109

Merged
merged 273 commits into from
Jun 3, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
273 commits
Select commit Hold shift + click to select a range
c106bd4
Update CHANGELOG.md
mnicely Apr 2, 2020
f4da5e0
Converted numba kernels to use new framework, type specialization, an…
mnicely Apr 2, 2020
9c27ab2
Update CHANGELOG.md
mnicely Apr 2, 2020
1c118c5
Merge pull request #44 from mnicely/fix_tests
awthomp Apr 2, 2020
8aa7b34
Update _signaltools.py
mnicely Apr 3, 2020
fb0d64e
Merge branch-0.13 into branch-0.14
BradReesWork Apr 3, 2020
f5db3ab
Merge pull request #46 from BradReesWork/branch-0.14-merge-0.13
raydouglass Apr 3, 2020
0e604d4
This should fix an unintended push/merge
mnicely Apr 3, 2020
39a6552
Added cupy raw kernels for correlate2d and convolve2d
mnicely Apr 6, 2020
ab77c42
Addition of decimation for FIR ftypes
awthomp Apr 7, 2020
9411a07
Fixing PR number
awthomp Apr 7, 2020
9ec3f55
Merge pull request #45 from mnicely/correlate_convolve_2d_numba
BradReesWork Apr 7, 2020
ba173af
Update bench_windows.py
mnicely Apr 7, 2020
03923e6
Update bench_wavelets.py
mnicely Apr 7, 2020
c99448e
Update bench_waveforms.py
mnicely Apr 7, 2020
7760c51
Update bench_spectral.py
mnicely Apr 7, 2020
aef7e71
Update bench_signaltools.py
mnicely Apr 7, 2020
ab00a4d
Update build.sh
mnicely Apr 7, 2020
fabbff9
Update bench_signaltools.py
mnicely Apr 7, 2020
e639cd2
Update bench_spectral.py
mnicely Apr 7, 2020
0afc17b
Update bench_waveforms.py
mnicely Apr 7, 2020
edc8267
Update bench_wavelets.py
mnicely Apr 7, 2020
4431c15
Update bench_windows.py
mnicely Apr 7, 2020
2bcf5df
Merge pull request #43 from mnicely/pytest_benchmark
BradReesWork Apr 7, 2020
1032ac4
Merge branch 'branch-0.14' into decimate
awthomp Apr 7, 2020
a247c41
Merge branch 'branch-0.14' into correlate_convolve_2d_cupy
mnicely Apr 7, 2020
4410b2b
1. Updated bench_signaltools.py and test_signaltools.py to accept use…
mnicely Apr 7, 2020
d556c64
Update CHANGELOG.md
mnicely Apr 7, 2020
47512b3
Fix flake8 issue
mnicely Apr 7, 2020
3578fcf
Merge pull request #49 from mnicely/correlate_convolve_2d_cupy
awthomp Apr 7, 2020
c8f2764
Merge branch 'branch-0.14' into decimate
awthomp Apr 7, 2020
46aca66
Update README to reorganize install instructions
awthomp Apr 7, 2020
b0d1a09
Fix formatting
awthomp Apr 7, 2020
3ce5b56
removing check for FIR filter
awthomp Apr 7, 2020
cc5c50f
Merge branch 'decimate' of github.com:awthomp/cusignal-dev into decimate
awthomp Apr 7, 2020
3bea981
Typo fix
awthomp Apr 7, 2020
8526dfa
Add Docker info
awthomp Apr 7, 2020
004bb34
Add CuPy Raw CUDA kernels
awthomp Apr 7, 2020
62d89c7
Adding tests/benchs for lombscargle
mnicely Apr 8, 2020
f5f90f2
Added test_spectral.py
mnicely Apr 8, 2020
ba694d1
Update CHANGELOG.md
mnicely Apr 8, 2020
07e7645
Update notebooks to use timeit rather than time
awthomp Apr 8, 2020
092e1ea
Merge pull request #48 from awthomp/decimate
BradReesWork Apr 8, 2020
6eb7ee1
Added cupy raw kernels
mnicely Apr 8, 2020
d2a16cf
Update CHANGELOG.md
mnicely Apr 8, 2020
96fb896
Merge pull request #50 from awthomp/readme_update
dillon-cullinan Apr 8, 2020
5a926f8
Use Numba 0.49+ API where required
dicta Apr 8, 2020
577d4a1
Update signaltools to include decimate
awthomp Apr 8, 2020
9560311
Update notebooks to use timeit instead of time
awthomp Apr 8, 2020
52d6737
Merge branch 'branch-0.14' into notebook_perf_update
awthomp Apr 8, 2020
a7c86e0
Merge pull request #51 from mnicely/lombscargle
awthomp Apr 9, 2020
d9a53ac
Merge branch 'branch-0.14' into numba-0.49-api-change
awthomp Apr 9, 2020
f76cdf1
Merge pull request #55 from awthomp/notebook_perf_update
awthomp Apr 9, 2020
36ed41b
Fix numba versioning issue when importing Complex
awthomp Apr 9, 2020
caa1f19
Remove kernel compile during import
mnicely Apr 9, 2020
0a77403
Added suggestions from @gmarkall and @dicta
mnicely Apr 12, 2020
c813840
Fixed how exception was raised per @gmarkell's suggestion
mnicely Apr 12, 2020
d5cdb94
Added precompile kernels to _upfirdn.py and _signaltools.py
mnicely Apr 13, 2020
e8e958f
Update CHANGELOG.md
mnicely Apr 13, 2020
879d15c
Merge branch 'branch-0.14' into minimize_import_time
mnicely Apr 13, 2020
8732592
Updated decimate function to use an existing FIR window if provided. …
boonedoggle Apr 13, 2020
49d2b5a
Added PR number to CHANGELOG.md
boonedoggle Apr 13, 2020
711c1b0
Merge pull request #53 from dicta/numba-0.49-api-change
awthomp Apr 13, 2020
b481903
Merge pull request #60 from deepwavedigital/decimate-resuse-fir-coef
awthomp Apr 13, 2020
2756fab
Fix dead link in README
awthomp Apr 14, 2020
39c60a4
Fix PR number
awthomp Apr 14, 2020
0b94227
Added CuPy kernels for correlate1d/convolve1d, along with tests and b…
mnicely Apr 14, 2020
a812b89
Merge branch 'branch-0.14' of https://github.com/mnicely/cusignal int…
mnicely Apr 14, 2020
9bd5a2e
Added logic to signaltools.py
mnicely Apr 14, 2020
42322a1
Added logic for scenarios when kernel > input
mnicely Apr 15, 2020
86c293e
Cleaned code and benchmarks
mnicely Apr 15, 2020
fc81052
Update CHANGELOG.md
mnicely Apr 15, 2020
33aecb8
Updated precompile_kernel to accept a kernel type
mnicely Apr 16, 2020
4798e54
Merge branch 'minimize_import_time' of https://github.com/mnicely/cus…
mnicely Apr 16, 2020
8362c29
Merge branch 'branch-0.14' into minimize_import_time
mnicely Apr 16, 2020
639fccf
Merge pull request #62 from mnicely/convolve1d
awthomp Apr 16, 2020
28e84e8
Merge branch 'branch-0.14' into minimize_import_time
mnicely Apr 16, 2020
0226fd9
Fix bad merge
mnicely Apr 16, 2020
21ecb1c
Updated precompile_kernels description
mnicely Apr 16, 2020
1943d05
Added robustness per @gmarkall's comments in https://github.com/rapid…
mnicely Apr 17, 2020
b4d15d7
Fix for Jenkins build
mnicely Apr 17, 2020
9949e1d
Merge pull request #56 from mnicely/minimize_import_time
awthomp Apr 20, 2020
6757a30
Added warning for Numba kernel deprecation
mnicely Apr 20, 2020
bc84023
Updated CHANGELOG.md
mnicely Apr 20, 2020
99a8d13
Fixed error with axis = 0 for and one row
mnicely Apr 20, 2020
191e21e
Added CuPy raw kernels for upfirdn2d
mnicely Apr 20, 2020
8c82a03
Added test and benchmarks
mnicely Apr 20, 2020
a6d1664
Build both 1d/2d kernels and decide which to run at runtime. Closer r…
mnicely Apr 20, 2020
e0d2ae2
Updated CHANGELOG.md and formatting
mnicely Apr 20, 2020
5bcdec8
cusignal code refactor and documentation update
awthomp Apr 21, 2020
14c68ff
update CHANGELOG
awthomp Apr 21, 2020
967df12
Update window import in signal tools to pass CI
awthomp Apr 21, 2020
e53b0dd
fix formatting
awthomp Apr 21, 2020
7c49d9b
Fix windows path
awthomp Apr 21, 2020
79fd04e
Adding utils and peak_finding. Fixing window errors in CI
awthomp Apr 21, 2020
d3fda27
adding gitignore for cusignal
awthomp Apr 21, 2020
d5de66c
fix formatting error
awthomp Apr 21, 2020
b794f5b
Adding spectral reorg support and removed vectorstrength from signalt…
awthomp Apr 21, 2020
7cfab8c
Bringing docs up to date with code refactor
awthomp Apr 21, 2020
62b758f
Adding resampling functions to filtering. Updated API docs
awthomp Apr 21, 2020
957c406
adding convolution and spectral reorg support and continue to move fu…
awthomp Apr 21, 2020
a9685b5
Adding filter design re-org and remove signaltools
awthomp Apr 21, 2020
a0f6d60
Move fftpack to utils and remove cupy_helper
awthomp Apr 21, 2020
e888b97
Update API docs and general cleanup
awthomp Apr 21, 2020
1239764
Fix typo in docs
awthomp Apr 21, 2020
81b7c7b
Fix bug in wiener filter
awthomp Apr 21, 2020
90d705e
Merge pull request #65 from mnicely/warnings
awthomp Apr 22, 2020
c45a724
Merge branch 'branch-0.14' into cusignal_refactor_python
awthomp Apr 22, 2020
ddd20ba
Changing name of window_functions to match lib import of scipy signal
awthomp Apr 23, 2020
8288c09
Merge branch 'cusignal_refactor_python' of github.com:awthomp/cusigna…
awthomp Apr 23, 2020
a67b12f
Merge branch 'branch-0.14' into upfirdn2d
mnicely Apr 23, 2020
a4c63af
Update _upfirdn.py
mnicely Apr 23, 2020
c6c6ba8
Merge pull request #67 from awthomp/cusignal_refactor_python
awthomp Apr 23, 2020
ba4f9d4
Merge pull request #66 from mnicely/upfirdn2d
awthomp Apr 23, 2020
53406de
remove stray paren
awthomp Apr 23, 2020
bfcd9ca
Merge branch 'branch-0.14' into readme_link_fix
awthomp Apr 23, 2020
5df7de8
Merge pull request #61 from awthomp/readme_link_fix
BradReesWork Apr 23, 2020
ca1df0b
hotfix to address docs build
awthomp Apr 23, 2020
7e33b46
Merge pull request #70 from awthomp/api-doc-hotfix
awthomp Apr 24, 2020
3267d10
Typo fixes in README
awthomp Apr 26, 2020
84e2218
Add blogs and external resources
awthomp Apr 26, 2020
69a0369
Skip existing on conda uploads
raydouglass Apr 27, 2020
3a139e4
Merge pull request #72 from raydouglass/conda-upload
raydouglass Apr 27, 2020
bed2053
Merge pull request #71 from awthomp/readme_update
BradReesWork Apr 28, 2020
988111e
add gpuci local build
efajardo-nv Apr 28, 2020
73f9384
Merge branch 'branch-0.14' of https://github.com/rapidsai/cusignal in…
efajardo-nv Apr 28, 2020
d523a59
update changelog
efajardo-nv Apr 28, 2020
efaf335
update cuda version in readme
efajardo-nv Apr 28, 2020
aa96052
Add ported lfilter method.
luigifcruz May 1, 2020
bec3256
Add new feature to the changelog.
luigifcruz May 1, 2020
6359a44
Merge pull request #73 from efajardo-nv/gpuci-local-build
ajschmidt8 May 4, 2020
f9a61d0
Merge branch 'branch-0.14' into lfilter
awthomp May 4, 2020
155f546
First attempt at lfilter based on luigi's, which is cupy'd version of…
mnicely May 4, 2020
bad6aa8
lfilter cupy raw kernel implementation
mnicely May 5, 2020
6a74e1f
minor changes
mnicely May 5, 2020
1fc5706
Merge pull request #75 from luigifreitas/lfilter
mnicely May 5, 2020
35629ea
Ported luigi's lfilter to cupy raw kernel
mnicely May 5, 2020
122c5a1
updated CHANGELOG.md and added checks for input shapes.
mnicely May 5, 2020
c408d14
Added updates per github comments. Also, add fix in bench_signaltools…
mnicely May 6, 2020
613449d
Merge pull request #78 from mnicely/lfilter_cupy
awthomp May 6, 2020
5e8baf5
Added autosync to upfirdn and updated documentation in resample.py
mnicely May 6, 2020
155ae90
Merge branch 'branch-0.14' into autosync
mnicely May 6, 2020
f14b36a
Added autosync to lfilter, update docs and formatting
mnicely May 6, 2020
8d56890
Added autosync to correlate(1D/2D) and convolve(1D/2D), update docs a…
mnicely May 6, 2020
50e251b
Added autosync to lombscargle, update docs and formatting
mnicely May 6, 2020
a2a55ae
Minor change
mnicely May 6, 2020
00d6598
Update CHANGELOG.md
mnicely May 6, 2020
55e4995
flake8 fixes
mnicely May 6, 2020
2cf7a6e
Initial create code_refactor repo
mnicely May 6, 2020
1dbace0
Fix import error
mnicely May 6, 2020
fa09f4d
Merge pull request #82 from mnicely/autosync
awthomp May 6, 2020
36857e0
Update conda environments and code to assume Numba >= 0.49, clean up …
awthomp May 6, 2020
988e513
update changelog
awthomp May 6, 2020
7a70803
Have a working version
mnicely May 6, 2020
fe46d5a
Added all CuPy kernels to refactor
mnicely May 7, 2020
715cd67
Merge branch-0.14
mnicely May 7, 2020
c8f1212
Minor changes
mnicely May 7, 2020
d90cb8b
Update CHANGELOG.md
mnicely May 7, 2020
4311c49
Added corrected checks for precompile kernels
mnicely May 7, 2020
391bcb4
Fix signaltools errors
mnicely May 7, 2020
de13362
Updated precompile_kernels documentation
mnicely May 7, 2020
66916b2
Forgot to add _lfilter_kernels.py and _upfirdn_kernels.py to repo
mnicely May 7, 2020
5aab21b
Fix flake8
mnicely May 7, 2020
40dc174
Renaming _precompile.py to _compile_kernels.py
mnicely May 7, 2020
3acf257
Forgot to add _compile_kernels.py
mnicely May 7, 2020
1e5f0f9
Removed list functionality for GPUBackend and GPUKernel in precompile…
mnicely May 7, 2020
f578436
Minor changes
mnicely May 7, 2020
19e7516
Documentation update
mnicely May 7, 2020
c289d75
Add clarifying documentation for lfilter perf
awthomp May 7, 2020
002eb8b
Update changelog PR number
awthomp May 7, 2020
74f5d81
Added parent TestWaveform and BenchWaveform classes. Added fixtures t…
mnicely May 7, 2020
282ef9e
Merge pull request #87 from awthomp/lfilter_doc
awthomp May 7, 2020
25d474f
Added parent classes to test and bench wavelets and using test fixtur…
mnicely May 7, 2020
4c39f81
Added parent classes to test and bench windows
mnicely May 7, 2020
63a3b2e
Merge branch 'branch-0.14' into numba_update
awthomp May 7, 2020
899d19b
Updates per Adam's comments on GH. Delayed import to fix circular imp…
mnicely May 7, 2020
d6dbb62
Separated _signaltools_kernels into _convolve_kernels.py and _correla…
mnicely May 7, 2020
423901f
Merge branch-0.14
mnicely May 7, 2020
d6b944c
Added parent classes to test and bench to spectral
mnicely May 7, 2020
1140010
Added parent classes to test and bench and added fixtures to test
mnicely May 7, 2020
6ba802d
Update CHANGELOG.md
mnicely May 7, 2020
bb41bad
Merge branch 'branch-0.14' into add_datatypes_test_bench
mnicely May 7, 2020
2bd84ca
Moving conftest.py up a directory so it is visible by test and benchm…
mnicely May 7, 2020
b1595ef
More file and function rearranging
mnicely May 7, 2020
20c471e
Resolve merge conflict
awthomp May 8, 2020
b6248f2
Updating conda environment to match new min cusignal dependencies
awthomp May 8, 2020
7545127
Merge branch 'numba_update' of github.com:awthomp/cusignal-dev into n…
awthomp May 8, 2020
c9d27a4
Removed backend and changed kernel input to string
mnicely May 8, 2020
2992a0f
Path changes
mnicely May 8, 2020
bf42355
Update docs
mnicely May 8, 2020
e6a2739
Update docs
mnicely May 8, 2020
e9a52ff
Minor change to fix pytest runs
mnicely May 8, 2020
6385a09
Merge pull request #83 from mnicely/code_refactor
awthomp May 8, 2020
5a0418b
Deprecate linear filter due to poor performance
awthomp May 8, 2020
617d0cb
Removing lfilter
awthomp May 8, 2020
4955802
update changelog
awthomp May 8, 2020
5aa1277
Add git attributes to remove notebooks from stats
May 10, 2020
877e2f1
update changelog
May 10, 2020
be0ef48
Fix typo
May 10, 2020
2507203
Merge pull request #95 from awthomp/add_gitattributes
awthomp May 10, 2020
c9a14ee
Merge branch 'branch-0.14' into add_datatypes_test_bench
awthomp May 10, 2020
a86bb86
Merge pull request #89 from mnicely/add_datatypes_test_bench
awthomp May 11, 2020
c262670
Merge branch 'branch-0.14' into lfilter_remove
mnicely May 11, 2020
df9730c
Update test_signaltools.py
mnicely May 11, 2020
ab935d2
Update bench_signaltools.py
mnicely May 11, 2020
f19587d
Update test_signaltools.py
mnicely May 11, 2020
d49c8a4
Update bench_signaltools.py
mnicely May 11, 2020
27af640
Fixing merge conflict
awthomp May 11, 2020
fc83b9f
Updating versions of numba and cupy in build script
awthomp May 11, 2020
428e7b3
Update bench_signaltools.py
mnicely May 11, 2020
ba6cb9e
Update test_signaltools.py
mnicely May 11, 2020
1b33b77
Merge pull request #93 from awthomp/lfilter_remove
awthomp May 11, 2020
a582916
Moved data type check to _populate_kernel_cache to be executed at com…
mnicely May 11, 2020
ce7128b
Update CHANGELOG.md
mnicely May 11, 2020
8f22dfe
Merge pull request #96 from mnicely/code_refactor_fix
awthomp May 11, 2020
59a23cb
Update yml to add pytest-benchmark; clarify env name as dev
awthomp May 11, 2020
22ba2c2
Add TOC and pytest benchmarking instructions
awthomp May 11, 2020
0e08834
Merge pull request #98 from awthomp/readme_doc_update
BradReesWork May 11, 2020
06f49f2
Merge pull request #84 from awthomp/numba_update
awthomp May 11, 2020
1de2f97
Merge branch 'branch-0.14' into conda_env_update
awthomp May 11, 2020
29bc9df
merge resolution
awthomp May 11, 2020
be1df1e
Update readme to match new conda env yml names
awthomp May 11, 2020
cf70850
merge conflict
awthomp May 11, 2020
a0b3ea8
Merge pull request #97 from awthomp/conda_env_update
awthomp May 11, 2020
2e5c9e3
Scaffolding for sosfilt
awthomp May 12, 2020
52d020e
Fix error in example
awthomp May 12, 2020
e2bc763
First cut at sosfilt Numba kernel
mnicely May 14, 2020
7980955
Adding tests and benchmarks
mnicely May 14, 2020
2f76553
Implement sos and zi matrices in shared memory
mnicely May 14, 2020
bd2a1df
Update documentation
mnicely May 14, 2020
8804b03
Clean up
mnicely May 14, 2020
ab29bee
Merge pull request #1 from mnicely/awthomp/sosfilt
awthomp May 14, 2020
e02b331
clean up debugging prints
mnicely May 14, 2020
0d6cd5e
Ported Numba kernel to CuPy
mnicely May 15, 2020
353f9fb
Clean up
mnicely May 15, 2020
530b199
Merge pull request #2 from mnicely/awthomp/sosfilt
awthomp May 15, 2020
f9af927
Reorganize jupyter notebooks
awthomp May 23, 2020
d4c4c9e
Update PR number
awthomp May 23, 2020
abd7455
fix flake8 errors
awthomp May 26, 2020
75af420
update changelog
awthomp May 26, 2020
b10725b
Fix ambigous variables
awthomp May 26, 2020
c899ee9
Add extra line
awthomp May 26, 2020
fd282ab
Merge pull request #104 from awthomp/flake8_fix
awthomp May 26, 2020
14829e3
Merge pull request #103 from awthomp/notebook_reorg
BradReesWork May 26, 2020
2a4bfa9
Fix pytest error
awthomp May 26, 2020
9d60d70
Place warning on experimental API in sosfilt docs
awthomp May 26, 2020
110b8c8
Merge pull request #99 from awthomp/sosfilt
awthomp May 27, 2020
5f47852
Update readme for 0.14
awthomp May 28, 2020
a39e955
Merge pull request #110 from awthomp/readme_update
raydouglass May 28, 2020
0adcf46
Update CHANGELOG.md
raydouglass Jun 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removed list functionality for GPUBackend and GPUKernel in precompile…
…_kernels
  • Loading branch information
mnicely committed May 7, 2020
commit 1e5f0f941fd15593d52af3948453538054b4a4f4
4 changes: 3 additions & 1 deletion python/cusignal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@
get_shared_mem
)
from cusignal._compile_kernels import (
precompile_kernels
precompile_kernels,
GPUKernel,
GPUBackend
)

# Versioneer
Expand Down
49 changes: 32 additions & 17 deletions python/cusignal/_compile_kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,11 @@ def _get_supported_types(k_type):

def _validate_input(dtype, backend, k_type):

backend = list(backend) if backend else list(GPUBackend)
k_type = list(k_type) if k_type else list(GPUKernel)
k_list = [k_type]
b_list = [backend]

backend = list(b_list) if backend else list(GPUBackend)
k_type = list(k_list) if k_type else list(GPUKernel)

for b, k in itertools.product(backend, k_type):
# Check if use_numba is support
Expand All @@ -181,9 +184,9 @@ def _validate_input(dtype, backend, k_type):
try:
numba_type, c_type = SUPPORTED_TYPES[np_type]

except ValueError:
raise ValueError(
"No kernel found for datatype {}".format(np_type)
except KeyError:
raise KeyError(
"Datatype {} not found for {}".format(np_type, k)
)

_populate_kernel_cache(np_type, b.value, k)
Expand Down Expand Up @@ -298,7 +301,11 @@ def _populate_kernel_cache(np_type, use_numba, k_type):
return
# JIT compile the numba kernels
if k_type == GPUKernel.CONVOLVE or k_type == GPUKernel.CORRELATE:
return # raise NotImplementedError
raise NotImplementedError(
"{} Numba has no Numba Implementation".format(
k_type
)
)
if k_type == GPUKernel.CORRELATE2D:
sig = _numba_convolve_2d_signature(numba_type)
_numba_kernel_cache[(str(numba_type), k_type.value)] = cuda.jit(
Expand All @@ -317,7 +324,11 @@ def _populate_kernel_cache(np_type, use_numba, k_type):
sig, fastmath=True
)(_numba_lombscargle)
elif k_type == GPUKernel.LFILTER:
return # raise NotImplementedError
raise NotImplementedError(
"{} Numba has no Numba Implementation".format(
k_type
)
)
elif k_type == GPUKernel.UPFIRDN:
sig = _numba_upfirdn_1d_signature(numba_type)
_numba_kernel_cache[(str(numba_type), k_type.value)] = cuda.jit(
Expand Down Expand Up @@ -409,31 +420,35 @@ def precompile_kernels(dtype=None, backend=None, k_type=None):
>>> from cusignal._upfirdn import GPUBackend, GPUKernel
>>> cusignal._lfilter.precompile_kernels()

To precompile a specific NumPy datatype, CuPy backend, and kernel type
>>> cusignal._lfilter.precompile_kernels( [np.float64],
[GPUBackend.CUPY], [GPUKernel.LFILTER],)
To precompile a specific NumPy data type [list of data types],
CuPy backend, and kernel type
>>> cusignal._lfilter.precompile_kernels( [np.float32, np.float64],
GPUBackend.CUPY, GPUKernel.LFILTER,)


To precompile a specific NumPy datatype and kernel type,
To precompile a specific NumPy data type and kernel type,
but both Numba and CuPY variations
>>> cusignal._lfilter.precompile_kernels( dtype=[np.float64],
k_type=[GPUKernel.LFILTER],)
k_type=GPUKernel.LFILTER,)
"""

if dtype is not None and not hasattr(dtype, "__iter__"):
raise TypeError(
"dtype ({}) should be in list - e.g [np.float32,]".format(dtype)
)

elif backend is not None and not hasattr(backend, "__iter__"):
elif backend is not None and not isinstance(backend, GPUBackend):
raise TypeError(
"backend ({}) should be in list - e.g [{},]".format(
backend, backend
"backend is type ({}), should be (GPUBackend) - e.g {}".format(
type(k_type), GPUBackend.CUPY
)
)
elif k_type is not None and not hasattr(k_type, "__iter__"):

elif k_type is not None and not isinstance(k_type, GPUKernel):
raise TypeError(
"k_type ({}) should be in list - e.g [{},]".format(k_type, k_type)
"k_type is type ({}), should be (GPUKernel) - e.g {}".format(
type(k_type), GPUKernel.CORRELATE
)
)
else:
_validate_input(dtype, backend, k_type)