Comments (4)
Just saw that brian2 has an issue for clip in cpp standalone as well (brian-team/brian2#782). Just referencing it here since probably the only difference btwn cpp and cuda implementation will be the __host__ __device__
flags I suppose.
from brian2cuda.
Brian2 templates just the first arguments (value
) and casts the other two (a_min
and a_max
) to double
(merged in brian-team/brian2#810).
Makes sense, but we might want an option to cast to float when having #37 implemented, which then is not type save for large integers. If we still want it, it should produce a warning and can probably be implemented similar as done for #45.
Either way, we should update this when we next update brian2, which added tests for the clip function to return the same type as the value
argument.
from brian2cuda.
now: only single precision
others move to wishlist
from brian2cuda.
I implemented a quick fix for single precision: Depending on precision mode (single/double), all argument of clip
are now float
or double
clip(float value, float min, float max){}
clip(double value, double min, double max){}
This means it is not type safe to pass int32
values in single precision mode. But it is not relevant for our benchmarks (we only pass 0
as integer literal in STDP).
brian2 has templated the value
parameter and castst the other to double
. brian2genn just used only float
, which is not typesafe.
from brian2cuda.
Related Issues (20)
- Reduce number of threads in push kernel for heterogeneous delays in bundle mode
- Implement special case connectivity matrices with pre/post IDs for models that effect only pre/post variables HOT 5
- Call reset kernel only with as many threads as there are spiking neurons (not as there are neurons in total)
- Refactor benchmarking scripts and update generated plots
- Check if storing the size of synapse groups is necessary? HOT 1
- Needs patch to run with Brian 2.4.2 HOT 2
- Optimize `StateMonitor`
- Impelement brian2cuda preference file support
- Copy all eventspace counters to host efficiently at each time step
- Investigate and document performance effects when working with `Subgroup`s HOT 1
- Consider partitioning eventspaces when using `Subgroup`s HOT 4
- Optimize `PopulationRateMonitor`
- Fix `SpikeMonitor` for `Subgroup`s HOT 1
- Optimize our `SpikeMonitor` for `Subgroups`
- Refactor test suite scripts
- Fix `ReferencError` in spatialneuron tests HOT 3
- Fix memory leak when having multiple `run` calls
- Spikes are lost when changing delays between `run` calls HOT 3
- Recent Brian2 update PR broke benchmark scripts HOT 1
- Brian2Cuda Uninstalls Brian2 2.5.1 and Installs 2.4.2 Which Won't Import HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brian2cuda.