Open charlesbmi opened 7 months ago
Thanks for the report.
Would you be able to provide a simple example that reproduces the slow performance with pytest?
Also, what version of macOS & is it Apple silicon or Intel?
(I have a fix for the __module__
warning, but I'm not sure if that could cause any performance issue)
In general the "setup" operations like device creation and kernel function compilation might not be so fast. If possible those should be done once before usage in a test fixture that is reused.
Calling an already compiled function multiple times with different data should then be quite fast.
Thanks so much for this library! It is really useful.
This works great in a script, although I am getting some very slow performance when running this in a
pytest
. It's okay if that isn't on the roadmap, but my only hint for the potential issue is a warning that comes up when importing the module (only withinpytest
):To reproduce, create file
test_mc_import.py
:Run:
Example: