From 237a8979fce743d6ae544534f7b534e2915ae2d9 Mon Sep 17 00:00:00 2001 From: Michael Ekstrand Date: Fri, 12 Feb 2021 10:54:25 -0700 Subject: [PATCH] warm up handles --- conftest.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/conftest.py b/conftest.py index 0cf2f4c2..d6645c5a 100644 --- a/conftest.py +++ b/conftest.py @@ -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 @@ -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