amnsbr / cubnm

A toolbox for biophysical network modeling on GPUs
https://cubnm.readthedocs.io
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

[ENH] Option to use floats vs doubles #21

Open amnsbr opened 2 months ago

amnsbr commented 2 months ago

In the core code currently there is an unused preprocessor flag to "USE_FLOATS" which is a remnant of the legacy code (https://github.com/amnsbr/bnm_cuda). After making sure it works with the updated code of cuBNM, we might be able to use this as an installation option which can be controlled by setting an environment variable before pip install or by using pip install cubnm[float].

However, ideally we should be able to make this a runtime option so that it doesn't require a separate installation, but I can imagine that this can be very challenging.

It is also important to think if this option should really exist, and if it is really okay to use float precision in some simulations.