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

V0.10.0 working #69

Draft
wants to merge 75 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
5fdbe83
Some sketch in simplifying `tensor.Tensor`
chewxy Mar 10, 2020
1f10192
Added Scalar type to prepare for v0.10.0
chewxy Mar 16, 2020
bda53da
Merge branch 'master' into v0.10.0-working
chewxy Jun 18, 2020
44e71b4
Exported StandardEngine
chewxy Jun 23, 2020
5cea23d
Merge branch 'master' into v0.10.0-working
chewxy Dec 20, 2020
0ef7b6b
Merge remote-tracking branch 'origin/v0.10.0-working' into v0.10.0-wo…
chewxy Dec 29, 2020
3e49a5e
Added an unsafe checker.
chewxy Dec 29, 2020
10669eb
Merge branch 'master' into v0.10.0-working
chewxy Jan 17, 2021
027a850
Merge branch 'master' into v0.10.0-working
chewxy Jan 17, 2021
266b215
Removed `standardEngine` requirement from the Tensor definition
chewxy Jan 18, 2021
f5f224b
Merge remote-tracking branch 'origin/v0.10.0-working' into v0.10.0-wo…
chewxy Jan 18, 2021
f79a6ba
Removed requirement for fmt.Stringer and fmt.Formatter
chewxy Jan 18, 2021
b90b340
Merge branch 'master' into v0.10.0-working
chewxy Apr 4, 2021
54b4849
Initial work to separate out View into its own type...
chewxy Apr 4, 2021
a45f584
Finished moving View out. Now time to deal with the transposey views
chewxy Apr 5, 2021
2b2c322
Merge branch 'master' into v0.10.0-working
chewxy Apr 18, 2021
72da5ac
Started to move out Dtype to its own package.
chewxy Jul 9, 2021
70f5515
More work to move Dtype related stuff into its own package
chewxy Jul 9, 2021
64da890
More work on moving Dtype to its own package
chewxy Jul 9, 2021
40696d4
Finished move of Dtype to its own package
chewxy Jul 9, 2021
f473c71
Moved Shapes out and use the shapes package
chewxy Jul 16, 2021
9284c4c
Merge remote-tracking branch 'origin/master' into v0.10.0-working
chewxy Jul 16, 2021
9c85a54
Merge remote-tracking branch 'origin/v0.10.0-working' into v0.10.0-wo…
chewxy Jul 16, 2021
3b361cb
Fixed iterator example
chewxy Jul 16, 2021
790423c
More work to remove Shape stuff from this package
chewxy Jul 16, 2021
aadb03f
Deifne equality for DenseTensor
chewxy Jul 21, 2021
b5d3255
Fixed MatMul API to handle different Tensor types
chewxy Jul 21, 2021
b9b9610
Expanded OpOpt's methods to allow modification
chewxy Jul 21, 2021
e350632
Added axial iterator
chewxy Jul 26, 2021
fc40f1f
Added max example
chewxy Jul 26, 2021
52da427
Added prelim sketch of Scatter
chewxy Jul 26, 2021
0276550
Added some checks for gather scatter
chewxy Jul 26, 2021
1392c0c
Fixed the def'n of StandardEngine, added StandardEngine2
chewxy Jul 28, 2021
45f2901
Moved funcopts into its own file because it should be in its own file.
chewxy Jul 28, 2021
945bb67
Added more support for context.Context. Now the API functions can be …
chewxy Jul 28, 2021
5708fa5
Generated tests for context func opts
chewxy Jul 28, 2021
843e31e
Unexported OpOpt.
chewxy Jul 28, 2021
8bb1cc3
Moved native iterators into package `tensor` proper.
chewxy Jul 29, 2021
309a2ff
Moved native select into package `tensor` as well.
chewxy Jul 29, 2021
17d8af0
Added lazy native select
chewxy Jul 29, 2021
693ae40
renamed the files
chewxy Jul 29, 2021
3b675c0
Renamed LazyNativeSelectF64 to BatchedNativeSelectF64
chewxy Jul 29, 2021
ff02820
Playing with the API a bit to see if I can make it nicer
chewxy Jul 29, 2021
6448fd0
Playing with API a bit more.
chewxy Jul 29, 2021
0eb6ae0
I am finally satisfied with the API. Added a lot more documentation
chewxy Jul 29, 2021
f4ff98c
fixed the WithBacking funcopt to actually play nicer with CUDA.
chewxy Aug 4, 2021
f478e34
Added a temporary range based iter...
chewxy Aug 4, 2021
3028c48
Fixed a bug in the ElNe API
chewxy Aug 5, 2021
e7ffa20
Added some funcopts to Inner to allow for context handling
chewxy Aug 18, 2021
d000a37
Added some more support for context.Context
chewxy Aug 19, 2021
9f3ca0f
Changed almost all the engine interface definitions to also include c…
chewxy Aug 19, 2021
c9298a2
Converted transpose and concat to use context.
chewxy Aug 19, 2021
4a15ca2
added some notes clarifying the API design of the tensor package. Loo…
chewxy Aug 19, 2021
8f8a52d
Fixed up Stack, Repeat and Diag
chewxy Aug 20, 2021
4f78ddc
Fixed the linear algebra methods to include context.Context
chewxy Aug 20, 2021
18e8bf8
Fixed reduction methods to use context
chewxy Aug 20, 2021
7a3ac9b
Fixed argmethods to use context
chewxy Aug 20, 2021
aebd7fd
Fixed up a missing FMA fix for handling contexts
chewxy Aug 20, 2021
ac15a99
Fixed most of the APIs. Some of them like the reduction-related packa…
chewxy Aug 20, 2021
4736352
Fixed up argmethods. Now to work on actually fixing the API
chewxy Aug 20, 2021
8f474cd
Fixed the API for Inner
chewxy Sep 2, 2021
fb09a60
Fixed the StdEng's definition of Trace to actually implement Tracer
chewxy Sep 3, 2021
423bfda
Changed the shape definition of Outer such that it only checks for th…
chewxy Sep 9, 2021
e89d039
Merge remote-tracking branch 'origin/master' into v0.10.0-working
chewxy Oct 4, 2021
6d947b5
Fixed minmaxbetween for 0.10.0
chewxy Oct 4, 2021
27f372d
Made the Slice type = shapes.Slice
chewxy Mar 21, 2022
c4c3263
Fixed error messages to have a consistent error message for NYIs
chewxy May 4, 2022
7e74991
Merge remote-tracking branch 'origin/master' into v0.10.0-working
chewxy May 4, 2022
5d33203
Fixed a bunch of issues due to merging from origin/master.
chewxy May 4, 2022
460aba2
Added documentation for Transpose and T()
chewxy May 4, 2022
d0c11c8
Added examples for SliceInto
chewxy May 4, 2022
2916935
Merge remote-tracking branch 'origin/master' into v0.10.0-working
Jul 18, 2022
02d9dc7
Merge remote-tracking branch 'origin/master' into v0.10.0-working
chewxy Jul 22, 2022
bf9b9e7
Some corrections to the tests of selbyidx. Prepping for the larger ch…
chewxy Sep 26, 2023
da1342f
Merge remote-tracking branch 'origin/v0.10.0-working' into v0.10.0-wo…
Sep 27, 2023
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
Prev Previous commit
Next Next commit
Fixed the def'n of StandardEngine, added StandardEngine2
chewxy committed Jul 28, 2021
commit 1392c0c1033555d7cb51db40679f17aabd0583ef
1 change: 0 additions & 1 deletion defaultengine.go
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ type StdEng struct {

// makeArray allocates a slice for the array
func (e StdEng) makeArray(arr *array, t dtype.Dtype, size int) {

arr.Raw = malloc(t, size)
arr.t = t
}
2 changes: 1 addition & 1 deletion dense.go
Original file line number Diff line number Diff line change
@@ -84,7 +84,7 @@ func (t *Dense) makeArray(size int) {
case arrayMaker:
te.makeArray(&t.array, t.t, size)
return
case StandardEngine:
case StandardEngine2:
default:

}
9 changes: 9 additions & 0 deletions engine.go
Original file line number Diff line number Diff line change
@@ -26,7 +26,16 @@ type Engine interface {
WorksWith(order DataOrder) bool // WorksWith returns true if the data order can be directly worked with
}

// StandardEngine is any engine that wraps a StdEng{}.
type StandardEngine interface {
StandardEngine2

// anything that wraps StdEng will contain the following interfaces:
arrayMaker
}

// StandardEngine2 is any engine that implements the basic operations of a standard engine.
type StandardEngine2 interface {
Engine

Adder
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -4,6 +4,8 @@ go 1.13

replace gorgonia.org/dtype => /home/chewxy/workspace/gorgoniaws/src/gorgonia.org/dtype

replace gorgonia.org/shapes => /home/chewxy/workspace/gorgoniaws/src/gorgonia.org/shapes

require (
github.com/apache/arrow/go/arrow v0.0.0-20201229220542-30ce2eb5d4dc
github.com/chewxy/math32 v1.0.6
@@ -15,6 +17,7 @@ require (
go4.org/unsafe/assume-no-moving-gc v0.0.0-20201222180813-1025295fd063
gonum.org/v1/gonum v0.8.2
gorgonia.org/dtype v0.0.0-00010101000000-000000000000
gorgonia.org/shapes v0.0.0-00010101000000-000000000000
gorgonia.org/vecf32 v0.9.0
gorgonia.org/vecf64 v0.9.0
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -44,6 +44,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
4 changes: 3 additions & 1 deletion scalar.go
Original file line number Diff line number Diff line change
@@ -8,6 +8,8 @@ import (
"reflect"
"unsafe"

"gorgonia.org/dtype"

"github.com/pkg/errors"
"gorgonia.org/tensor/internal/storage"
)
@@ -87,7 +89,7 @@ func (s Scalar) GobEncode() ([]byte, error) {
}
func (s Scalar) GobDecode([]byte) error { return errors.Errorf(methodNYI, "GobDecode", "Scalar") } // TODO

func (s Scalar) standardEngine() standardEngine { return StdEng{} }
func (s Scalar) standardEngine() StandardEngine { return StdEng{} }
func (s Scalar) hdr() *storage.Header { return nil }
func (s Scalar) arr() array { return array{} }
func (s Scalar) arrPtr() *array { return nil }