From 99e08a46424d97862300fdcfbc500f96c2104d3f Mon Sep 17 00:00:00 2001 From: "Randall C. O'Reilly" Date: Sat, 2 Nov 2024 13:59:28 -0700 Subject: [PATCH] all gpu kernels compiling on CPU and GPU! --- axon/network.go | 2 +- axon/network.goal | 2 +- axon/pathparams.go | 3 +-- axon/pathparams.goal | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/axon/network.go b/axon/network.go index 68743447..4f1302f0 100644 --- a/axon/network.go +++ b/axon/network.go @@ -388,7 +388,7 @@ func DWtSyn(i uint32) { //gosl:kernel pti := SynapseIxs.Value(int(SynPathIndex), int(syni)) si := SynapseIxs.Value(int(SynSendIndex), int(syni)) ri := SynapseIxs.Value(int(SynRecvIndex), int(syni)) - Paths[pti].DWtSyn(ctx, syni, si, ri, di) + Paths[pti].DWtSyn(ctx, &Layers[Paths[pti].Indexes.RecvLayer], syni, si, ri, di) } // DWtFromDiSyn is the kernel over Synapses (not * Data) to diff --git a/axon/network.goal b/axon/network.goal index 6ebc53c9..4fd17661 100644 --- a/axon/network.goal +++ b/axon/network.goal @@ -382,7 +382,7 @@ func DWtSyn(i uint32) { //gosl:kernel pti := SynapseIxs[SynPathIndex, syni] si := SynapseIxs[SynSendIndex, syni] ri := SynapseIxs[SynRecvIndex, syni] - Paths[pti].DWtSyn(ctx, syni, si, ri, di) + Paths[pti].DWtSyn(ctx, &Layers[Paths[pti].Indexes.RecvLayer], syni, si, ri, di) } // DWtFromDiSyn is the kernel over Synapses (not * Data) to diff --git a/axon/pathparams.go b/axon/pathparams.go index f8aef217..7bf11ded 100644 --- a/axon/pathparams.go +++ b/axon/pathparams.go @@ -348,11 +348,10 @@ func (pt *PathParams) SendSpike(ctx *Context, ni, di, lni uint32) { // DWtSyn is the overall entry point for weight change (learning) at given synapse. // It selects appropriate function based on pathway type. // rpl is the receiving layer SubPool -func (pt *PathParams) DWtSyn(ctx *Context, syni, si, ri, di uint32) { +func (pt *PathParams) DWtSyn(ctx *Context, rlay *LayerParams, syni, si, ri, di uint32) { if pt.Learn.Learn == 0 { return } - rlay := &Layers[pt.Indexes.RecvLayer] isTarget := rlay.Acts.Clamp.IsTarget > 0 spi := NeuronIxs.Value(int(NrnSubPool), int(ri)) pi := rlay.PoolIndex(spi) diff --git a/axon/pathparams.goal b/axon/pathparams.goal index ae8b14de..0c206eb7 100644 --- a/axon/pathparams.goal +++ b/axon/pathparams.goal @@ -346,11 +346,10 @@ func (pt *PathParams) SendSpike(ctx *Context, ni, di, lni uint32) { // DWtSyn is the overall entry point for weight change (learning) at given synapse. // It selects appropriate function based on pathway type. // rpl is the receiving layer SubPool -func (pt *PathParams) DWtSyn(ctx *Context, syni, si, ri, di uint32) { +func (pt *PathParams) DWtSyn(ctx *Context, rlay *LayerParams, syni, si, ri, di uint32) { if pt.Learn.Learn == 0 { return } - rlay := &Layers[pt.Indexes.RecvLayer] isTarget := rlay.Acts.Clamp.IsTarget > 0 spi := NeuronIxs[NrnSubPool, ri] pi := rlay.PoolIndex(spi)