gorgonia / tensor

package tensor provides efficient and generic n-dimensional arrays in Go that are useful for machine learning and deep learning purposes
Apache License 2.0
362 stars 49 forks source link

Go Version 1.15.3 #85

Closed phillips96 closed 4 years ago

phillips96 commented 4 years ago

Hello,

There appears to be an issue w.r.t Go v1.15.3. The code to reproduce the below was a simple copy/paste from the README or Gorgonia. Please see the below trace;

# gorgonia.org/tensor
../../../go/src/gorgonia.org/tensor/array.go:24:7: array2 is incomplete (or unallocatable); stack allocation disallowed
../../../go/src/gorgonia.org/tensor/array.go:168:38: array2 is incomplete (or unallocatable); stack allocation disallowed
../../../go/src/gorgonia.org/tensor/array.go:298:2: rawdata is incomplete (or unallocatable); stack allocation disallowed
../../../go/src/gorgonia.org/tensor/array.go:371:3: array2 is incomplete (or unallocatable); stack allocation disallowed
../../../go/src/gorgonia.org/tensor/array.go:372:3: array2 is incomplete (or unallocatable); stack allocation disallowed
../../../go/src/gorgonia.org/tensor/defaultengine_matop_misc.go:211:8: array2 is incomplete (or unallocatable); stack allocation disallowed
../../../go/src/gorgonia.org/tensor/defaultengine_matop_misc.go:220:5: array2 is incomplete (or unallocatable); stack allocation disallowed
../../../go/src/gorgonia.org/tensor/array.go:376:19: array2 is incomplete (or unallocatable); stack allocation disallowed
../../../go/src/gorgonia.org/tensor/array.go:377:19: array2 is incomplete (or unallocatable); stack allocation disallowed
../../../go/src/gorgonia.org/tensor/dense.go:608:45: array2 is incomplete (or unallocatable); stack allocation disallowed
../../../go/src/gorgonia.org/tensor/dense.go:608:45: too many errors

I'm new to Go, and looking to port a few things over from TF. I rolled back to 1.13.9 and of course have no problems (haven't tested any intermediate versions). I had a quick look at the change logs from v1.14 -> v1.15 where it mentions making some allocations mandatory so I'm assuming it has to do with storage.Header inside the array2 struct, but like I said i'm new to the language so would be in no place to suggest a fix myself.

Thanks :smile:

chewxy commented 4 years ago

How annoying. I thought I fixed this. I will look into it.

chewxy commented 4 years ago

Fixed in #87

chewxy commented 4 years ago

This is now fixed. There is a new version : v0.9.12 now.