Skip to content

Commit

Permalink
warm up handles
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Feb 12, 2021
1 parent 2f34403 commit 237a897
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from hypothesis import settings
from pytest import fixture
from csr import CSR
from csr.kernels import use_kernel, get_kernel

# turn off Numba logging
Expand All @@ -24,7 +25,13 @@ def kernel(request):
will be called once for each kernel under active test.
"""
with use_kernel(request.param):
yield get_kernel()
k = get_kernel()
# warm-up the kernel
m = CSR.empty(1, 1)
h = k.to_handle(m)
k.release_handle(h)
del h, m
yield k


# set up profiles
Expand Down

0 comments on commit 237a897

Please sign in to comment.