gorgonia/tensor

"array2 is incomplete (or unallocatable); stack allocation disallowed" from examples

Closed this issue · 2 comments

I'm getting this error with the example from the Gorgonia website:

gorgonia.org/tensor

../../../../go/pkg/mod/gorgonia.org/tensor@v0.9.11/array.go:24:7: array2 is incomplete (or unallocatable); stack allocation disallowed
../../../../go/pkg/mod/gorgonia.org/tensor@v0.9.11/array.go:168:38: array2 is incomplete (or unallocatable); stack allocation disallowed
../../../../go/pkg/mod/gorgonia.org/tensor@v0.9.11/array.go:298:2: rawdata is incomplete (or unallocatable); stack allocation disallowed
../../../../go/pkg/mod/gorgonia.org/tensor@v0.9.11/array.go:371:3: array2 is incomplete (or unallocatable); stack allocation disallowed
../../../../go/pkg/mod/gorgonia.org/tensor@v0.9.11/array.go:372:3: array2 is incomplete (or unallocatable); stack allocation disallowed

I'm running on macOS 10.13.6 High Sierra with go1.15.3 darwin/amd64 on a 2010 machine.

Can I quickly verify this isn't an issue with environment setup or platform? I've checked for the response on another machine from 2013 running macOS 10.15.7 and it's still present.

The example I'm using is as follows:

package main
import (
  "fmt"
  "log"
  "gorgonia.org/gorgonia"
)

func main(){
  g := NewGraph()

  var a, c, c *Node
  var err error

  a = NewScalar(g, Float64, WithName("a"))
  b = NewScalar(g, Float64, WithName("b"))

  c, err = Add(a, b)

  if err != nil {
    log.Fatal(err)
  }

  machine := NewTapeMachine(g)

  Let(a, 1.0)
  Let(b, 2.0)
  if machine.RunAll() != nil {
    log.Fatal(err)
  }
  fmt.Printf("%v", c.Value())

}```

related to #85

Fixed in #87