Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial dls impl and goki monorepo update #325

Merged
merged 16 commits into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .goki/config.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Name = "axon"
ID = "com.emer.axon"
Desc = ""
Version = "v2.0.0-dev0.0.2"
Version = "v2.0.0-dev0.0.4"
Type = "Library"

[Build]
Package = "."
Output = ""
ID = "org.emer.axon"
Debug = false
Rebuild = false
Install = false
Expand All @@ -18,6 +18,13 @@ Type = "Library"
AndroidMinSDK = 23
AndroidTargetSDK = 29

[[Build.Target]]
OS = "darwin"
Arch = "arm64"

[Pack]
DMG = true

[Web]
Port = "8080"
RandomVersion = false
Expand All @@ -26,13 +33,10 @@ Type = "Library"
ThemeColor = "#2d2c2c"
LoadingLabel = ""
Lang = "en"
Title = ""
Description = ""
Author = ""
Image = ""
AutoUpdateInterval = "10s"
WasmContentLengthHeader = ""
ServiceWorkerTemplate = ""

[Setup]
[Setup.Platform]
Expand Down
6 changes: 3 additions & 3 deletions axon/act.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ package axon
import (
"github.com/emer/axon/v2/chans"
"github.com/emer/emergent/v2/erand"
"goki.dev/etable/v2/minmax"
"goki.dev/gosl/v2/slbool"
"goki.dev/mat32/v2"
"github.com/emer/etable/v2/minmax"
"github.com/emer/gosl/v2/slbool"
"goki.dev/mat32"
)

///////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions axon/act_prjn.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"log"

"github.com/emer/emergent/v2/erand"
"goki.dev/gosl/v2/slbool"
"goki.dev/mat32/v2"
"github.com/emer/gosl/v2/slbool"
"goki.dev/mat32"
)

//gosl: start act_prjn
Expand Down
2 changes: 1 addition & 1 deletion axon/act_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package axon
import (
"testing"

"goki.dev/mat32/v2"
"goki.dev/mat32"
)

// TOLERANCE is the numerical difference tolerance for comparing vs. target values
Expand Down
4 changes: 2 additions & 2 deletions axon/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"github.com/emer/emergent/v2/etime"
"github.com/emer/emergent/v2/params"
"github.com/emer/emergent/v2/prjn"
"goki.dev/etable/v2/etensor"
"github.com/emer/etable/v2/etensor"
"goki.dev/laser"
"goki.dev/mat32/v2"
"goki.dev/mat32"
"golang.org/x/exp/maps"
)

Expand Down
4 changes: 2 additions & 2 deletions axon/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"math"

"github.com/emer/emergent/v2/etime"
"github.com/emer/gosl/v2/slbool"
"github.com/emer/gosl/v2/slrand"
"goki.dev/glop/num"
"goki.dev/gosl/v2/slbool"
"goki.dev/gosl/v2/slrand"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion axon/deep_layers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package axon

import (
"github.com/emer/emergent/v2/params"
"goki.dev/mat32/v2"
"goki.dev/mat32"
)

//gosl: start deep_layers
Expand Down
4 changes: 2 additions & 2 deletions axon/gpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import (
"unsafe"

"github.com/emer/empi/v2/mpi"
"github.com/goki/vgpu/vgpu"
vk "github.com/goki/vulkan"
"goki.dev/goosi"
"goki.dev/vgpu"
)

//go:embed shaders/*.spv
var content embed.FS

//go:generate gosl -exclude=Update,UpdateParams,Defaults,AllParams goki.dev/mat32/v2/fastexp.go goki.dev/etable/v2/minmax ../chans/chans.go ../chans ../kinase ../fsfffb/inhib.go ../fsfffb github.com/emer/emergent/v2/etime github.com/emer/emergent/v2/ringidx rand.go avgmax.go neuromod.go globals.go context.go neuron.go synapse.go pool.go layervals.go act.go act_prjn.go inhib.go learn.go layertypes.go layerparams.go deep_layers.go rl_layers.go pvlv_layers.go pcore_layers.go prjntypes.go prjnparams.go deep_prjns.go rl_prjns.go pvlv_prjns.go pcore_prjns.go hip_prjns.go gpu_hlsl
//go:generate gosl -exclude=Update,UpdateParams,Defaults,AllParams goki.dev/mat32/fastexp.go github.com/emer/etable/v2/minmax ../chans/chans.go ../chans ../kinase ../fsfffb/inhib.go ../fsfffb github.com/emer/emergent/v2/etime github.com/emer/emergent/v2/ringidx rand.go avgmax.go neuromod.go globals.go context.go neuron.go synapse.go pool.go layervals.go act.go act_prjn.go inhib.go learn.go layertypes.go layerparams.go deep_layers.go rl_layers.go pvlv_layers.go pcore_layers.go prjntypes.go prjnparams.go deep_prjns.go rl_prjns.go pvlv_prjns.go pcore_prjns.go hip_prjns.go gpu_hlsl

// Full vars code -- each gpu_*.hlsl uses a subset

Expand Down
100 changes: 50 additions & 50 deletions axon/gtigen.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion axon/hebbprjn.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package axon

todo: for GPU, must have this in base case

import "goki.dev/gosl/v2/slbool"
import "github.com/emer/gosl/v2/slbool"

// HebbPrjn is a simple hebbian learning projection, using the CPCA Hebbian rule.
// Note: when used with inhibitory projections, requires Learn.Trace.SubMean = 1
Expand Down
2 changes: 1 addition & 1 deletion axon/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/emer/emergent/v2/ecmd"
"github.com/emer/empi/v2/mpi"
"goki.dev/gi/v2/gi"
"goki.dev/gi"
)

////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion axon/hip_net.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/emer/emergent/v2/evec"
"github.com/emer/emergent/v2/looper"
"github.com/emer/emergent/v2/prjn"
"goki.dev/etable/v2/norm"
"github.com/emer/etable/v2/norm"
)

// HipConfig have the hippocampus size and connectivity parameters
Expand Down
4 changes: 2 additions & 2 deletions axon/inhib.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package axon

import (
"github.com/emer/axon/v2/fsfffb"
"goki.dev/gosl/v2/slbool"
"goki.dev/mat32/v2"
"github.com/emer/gosl/v2/slbool"
"goki.dev/mat32"
)

//gosl: hlsl inhib
Expand Down
2 changes: 1 addition & 1 deletion axon/layer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"

"github.com/emer/emergent/v2/erand"
"goki.dev/etable/v2/etensor"
"github.com/emer/etable/v2/etensor"
)

// index naming:
Expand Down
4 changes: 2 additions & 2 deletions axon/layer_compute.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"fmt"
"log"

"goki.dev/etable/v2/minmax"
"goki.dev/mat32/v2"
"github.com/emer/etable/v2/minmax"
"goki.dev/mat32"
)

// index naming:
Expand Down
2 changes: 1 addition & 1 deletion axon/layer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"testing"

"github.com/emer/emergent/v2/prjn"
"github.com/emer/etable/v2/etensor"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"goki.dev/etable/v2/etensor"
)

func TestLayer(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions axon/layerbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import (
"github.com/emer/emergent/v2/params"
"github.com/emer/emergent/v2/relpos"
"github.com/emer/emergent/v2/weights"
"goki.dev/etable/v2/etensor"
"goki.dev/gi/v2/giv"
"github.com/emer/etable/v2/etensor"
"goki.dev/giv"
"goki.dev/glop/indent"
"goki.dev/mat32/v2"
"goki.dev/mat32"
)

// LayerBase manages the structural elements of the layer, which are common
Expand Down
2 changes: 1 addition & 1 deletion axon/layerparams.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package axon
import (
"encoding/json"

"goki.dev/mat32/v2"
"goki.dev/mat32"
)

//gosl: hlsl layerparams
Expand Down
6 changes: 3 additions & 3 deletions axon/learn.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"github.com/emer/axon/v2/chans"
"github.com/emer/axon/v2/kinase"
"github.com/emer/emergent/v2/erand"
"goki.dev/etable/v2/minmax"
"goki.dev/gosl/v2/slbool"
"goki.dev/mat32/v2"
"github.com/emer/etable/v2/minmax"
"github.com/emer/gosl/v2/slbool"
"goki.dev/mat32"
)

///////////////////////////////////////////////////////////////////////
Expand Down
18 changes: 9 additions & 9 deletions axon/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import (
"github.com/emer/emergent/v2/elog"
"github.com/emer/emergent/v2/estats"
"github.com/emer/emergent/v2/etime"
"goki.dev/etable/v2/agg"
"goki.dev/etable/v2/eplot"
"goki.dev/etable/v2/etable"
"goki.dev/etable/v2/etensor"
"goki.dev/etable/v2/metric"
"goki.dev/etable/v2/minmax"
"goki.dev/etable/v2/norm"
"goki.dev/etable/v2/split"
"goki.dev/etable/v2/tsragg"
"github.com/emer/etable/v2/agg"
"github.com/emer/etable/v2/eplot"
"github.com/emer/etable/v2/etable"
"github.com/emer/etable/v2/etensor"
"github.com/emer/etable/v2/metric"
"github.com/emer/etable/v2/minmax"
"github.com/emer/etable/v2/norm"
"github.com/emer/etable/v2/split"
"github.com/emer/etable/v2/tsragg"
)

// LogTestErrors records all errors made across TestTrials, at Test Epoch scope
Expand Down
2 changes: 1 addition & 1 deletion axon/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/c2h5oh/datasize"
"github.com/emer/emergent/v2/emer"
"github.com/emer/emergent/v2/prjn"
"goki.dev/etable/v2/etensor"
"github.com/emer/etable/v2/etensor"
)

// axon.Network implements the Axon spiking model,
Expand Down
4 changes: 2 additions & 2 deletions axon/networkbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ import (
"github.com/emer/emergent/v2/relpos"
"github.com/emer/emergent/v2/timer"
"github.com/emer/emergent/v2/weights"
"goki.dev/gi/v2/gi"
"goki.dev/gi"
"goki.dev/glop/dedupe"
"goki.dev/glop/indent"
"goki.dev/mat32/v2"
"goki.dev/mat32"
)

// NetworkBase manages the basic structural components of a network (layers).
Expand Down
4 changes: 2 additions & 2 deletions axon/neuromod.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
package axon

import (
"goki.dev/gosl/v2/slbool"
"goki.dev/mat32/v2"
"github.com/emer/gosl/v2/slbool"
"goki.dev/mat32"
)

//gosl: start neuromod
Expand Down
2 changes: 1 addition & 1 deletion axon/pcore_layers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"log"
"strings"

"github.com/emer/gosl/v2/slbool"
"goki.dev/glop/num"
"goki.dev/gosl/v2/slbool"
)

//gosl: start pcore_layers
Expand Down
4 changes: 2 additions & 2 deletions axon/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package axon

import (
"github.com/emer/axon/v2/fsfffb"
"goki.dev/gosl/v2/slbool"
"goki.dev/mat32/v2"
"github.com/emer/gosl/v2/slbool"
"goki.dev/mat32"
)

//gosl: hlsl pool
Expand Down
2 changes: 1 addition & 1 deletion axon/prjn.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/emer/emergent/v2/erand"
"github.com/emer/emergent/v2/weights"
"goki.dev/etable/v2/etensor"
"github.com/emer/etable/v2/etensor"
"goki.dev/glop/indent"
)

Expand Down
8 changes: 4 additions & 4 deletions axon/prjnbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"github.com/emer/emergent/v2/emer"
"github.com/emer/emergent/v2/params"
"github.com/emer/emergent/v2/prjn"
"goki.dev/etable/v2/etensor"
"goki.dev/etable/v2/minmax"
"goki.dev/gi/v2/giv"
"goki.dev/mat32/v2"
"github.com/emer/etable/v2/etensor"
"github.com/emer/etable/v2/minmax"
"goki.dev/giv"
"goki.dev/mat32"
)

// index naming:
Expand Down
2 changes: 1 addition & 1 deletion axon/prjnparams.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"encoding/json"
"strings"

"goki.dev/mat32/v2"
"goki.dev/mat32"
)

//gosl: hlsl prjnparams
Expand Down
2 changes: 1 addition & 1 deletion axon/pvlv.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package axon
import (
"github.com/emer/emergent/v2/erand"
"goki.dev/glop/num"
"goki.dev/mat32/v2"
"goki.dev/mat32"
)

// DriveParams manages the drive parameters for computing and updating drive state.
Expand Down
4 changes: 2 additions & 2 deletions axon/pvlv_layers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"log"
"strings"

"goki.dev/gosl/v2/slbool"
"goki.dev/mat32/v2"
"github.com/emer/gosl/v2/slbool"
"goki.dev/mat32"
)

//gosl: start pvlv_layers
Expand Down
2 changes: 1 addition & 1 deletion axon/rand.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package axon

import (
"goki.dev/gosl/v2/slrand"
"github.com/emer/gosl/v2/slrand"
)

//gosl: hlsl axonrand
Expand Down
2 changes: 1 addition & 1 deletion axon/rl_layers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package axon

import (
"goki.dev/etable/v2/minmax"
"github.com/emer/etable/v2/minmax"
)

//gosl: start rl_layers
Expand Down
4 changes: 2 additions & 2 deletions axon/threads_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"github.com/emer/emergent/v2/etime"
"github.com/emer/emergent/v2/patgen"
"github.com/emer/emergent/v2/prjn"
"github.com/emer/etable/v2/etable"
"github.com/emer/etable/v2/etensor"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"goki.dev/etable/v2/etable"
"goki.dev/etable/v2/etensor"
)

const (
Expand Down
Loading