Hooks and Probes

1 view
Skip to first unread message

Rick Gerkin

unread,
Jun 17, 2010, 11:55:00 PM6/17/10
to ahh-d...@googlegroups.com
Could you elaborate on the nature of "hooks" and "probes".  I guess this is for analysis of the data before it is all collected?  This is probably the only part of the project I would be able to contribute to in the near future.   

Rick  

--
Richard C. Gerkin
Postdoctoral Fellow, Dept. of Biological Sciences
Carnegie Mellon University

Cyrus Omar

unread,
Jun 18, 2010, 12:26:43 AM6/18/10
to ahh-d...@googlegroups.com, ahh-d...@googlegroups.com
Yes I am working on a poster for next week and I will review the
documentation, which is very incomplete atm, in the process. Play with
cl.oquence until then if you have time - implement your favorite
analysis technique. I'm interested in seeing what issues remain and
getting some more unit tests written and possibly some good analysis
code in cl.ements. Feel free to ask lots of questions and if an error
seems fishy it could be a bug so let me know.

> --
> You received this message because you are subscribed to the Google
> Groups "ahh-discuss" group.
> To post to this group, send email to ahh-d...@googlegroups.com.
> To unsubscribe from this group, send email to ahh-discuss...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/ahh-discuss?hl=en
> .

Michael Rule

unread,
Jun 18, 2010, 10:25:47 AM6/18/10
to ahh-d...@googlegroups.com
Probes just pull data out of the simulation while it is running.
AHH/SS call the CPU side routines of the probes between each time
step, so you can copy spikes/currents/whatever to the CPU.

Hooks are just places you can put code in the automatically generated
GPU kernel. So, "code that goes in the if(spike) block after spikes
have been sent" is a hook, "code that happens before the model
variables are loaded from memory" is a hook. For the most part, this
code needs to be given as a string of valid CUDA/OpenCL C, with proper
semicolon termination of statements. Some API specific macros exist,
at least in SpikeSteream, eg "RAND" to get ( weak ) random floats.

The important hooks are the ones used for defining models and synapse behavior :
- InputSource(Unit)
- - self.code : a C statement as a string that modified implicite
local variable input_current
- - can be added to neurons, where it contributed to the driving
currents of the neuron
- Synapse(InputSource)
- - synapse.name : name unique within model
- - self.conductance : name of a state variable, in units of uS (micro-siemens)
- - self.delta_g : the amount that self.conductance state variable
should be incremented, per incoming spike
- - self.current : similar to InputSource.code ?
- neuron dynamics
- - Model(Unit)
- - - self.target_function : C function goes from model_cell_id to a
target synapse type
- - - self.reset : C code if spike
- - - self.dont_reset : C code if no spike
- - - self.spike_condition : C code (spike)? [ one expression ]

Basic probes to pull out spikes, state variables, mean state
variables, have been defined. If you are writing your own Probe, you
can provide custom C code to be inserted in the generated kernel. This
code can be inserted in the various hooks defined for Probes. For the
most part, this code will consist of copying some information from the
simulation into a buffer on the GPU where you can then copy it back to
host in the CPU portions of the Probe. Some probes don't need to
generate code : if you are pulling out state variables or spikes, its
possible to figure out where to copy by looking at information stored
in the Simulation instance.

Michael Rule

unread,
Jun 18, 2010, 10:26:55 AM6/18/10
to ahh-d...@googlegroups.com
- InputSource(Unit)
- - self.code : a C statement as a string that modified the
input_current variable

Cyrus Omar

unread,
Jun 18, 2010, 12:32:19 PM6/18/10
to ahh-d...@googlegroups.com
(the names of things above are for SpikeStream, not cl.egans, but the concepts are the same)

Michael Rule

unread,
Jun 18, 2010, 12:33:56 PM6/18/10
to ahh-d...@googlegroups.com
what are they in AHH ?

Cyrus Omar

unread,
Jun 18, 2010, 12:37:31 PM6/18/10
to ahh-d...@googlegroups.com
Unit -> Node (the simulation is a tree now instead of a fixed 2-level structure of simulations and models)
InputSource -> Current

and various attributes of these classes have changed. I'll have documentation generating for this stuff soon.

Michael Rule

unread,
Jun 18, 2010, 12:44:30 PM6/18/10
to ahh-d...@googlegroups.com
I think what I would really want... is a collection of 3 or 4 minimalist examples that I can just copy-paste-tweak to build larger simulations. This seems to be the fastest way of doing things. Maybe a SpikeStream-AHH equivalence chart if we want to continue supporting SpikeStream within the lab.

Rick Gerkin

unread,
Jun 18, 2010, 12:45:08 PM6/18/10
to ahh-d...@googlegroups.com
If I understand this correctly, STDP is a hook, whereas computing the spike count is a probe.  I wonder if I should wait for the cl.egans docs or try to figure this out from the rest of the ahh docs plus playing around with, say, cl/egans/scripts/test/simple_sim.py?  

Rick  

On Fri, Jun 18, 2010 at 12:37 PM, Cyrus Omar <cyrus...@gmail.com> wrote:

Michael Rule

unread,
Jun 18, 2010, 12:46:13 PM6/18/10
to ahh-d...@googlegroups.com
you have STDP working ?
you implemented per-synapse state ?

Cyrus Omar

unread,
Jun 18, 2010, 12:54:08 PM6/18/10
to ahh-d...@googlegroups.com
STDP is not working atm no.

Rick, I'd wait a bit before playing with cl.egans. Should be basically ready today but documentation might take until next week sometime.

Cyrus

Cyrus Omar

unread,
Jun 18, 2010, 12:54:58 PM6/18/10
to ahh-d...@googlegroups.com
I'll have the Brette et al, 2007 model and also an inhomogenous Poisson model as examples at minimum. You are welcome to port your OB model and we can use it as an example too if you'd like.
Reply all
Reply to author
Forward
0 new messages