[Numpy-discussion] Starting to work on runtime plugin system for plugin (automatic sse optimization, etc...)

David Cournapeau cournape@gmail....
Mon Apr 28 20:48:47 CDT 2008

On Tue, Apr 29, 2008 at 4:03 AM, Stéfan van der Walt <stefan@sun.ac.za> wrote:
>  What I meant was: would the plugin "slots" be decided beforehand, or
>  could we manipulate them at runtime?  I.e. what I would really enjoy
>  doing is define arbitrary ufuncs and plug them in (not only the blas
>  funcs and a select few others).

For each set of functions, there is a init function (just like python
extensions) you must call before calling any function, and you can do
what you want there: this could be controlled by environment variables
and the likes. I still don't have a clear idea on the API for handling
the different ways you would like to load the plugin (multi thread vs
mono-thread, SSE1/2/3/4 vs no SSE, etc...), though. I would prefer
every plugin to have exactly the same signature for the init function,
and would like to avoid as much as possible global state.

The thing I wanted to do but quickly gave up because of the complexity
is unloading/reloading a plugin. For example, at the beginning, you
may want to load atlas for the blas, and then use mkl instead.



More information about the Numpy-discussion mailing list