Skip to content

Commit

Permalink
Refactored versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Swopper050 committed Dec 2, 2024
1 parent 5406257 commit 095692a
Show file tree
Hide file tree
Showing 86 changed files with 1,888 additions and 274 deletions.
2 changes: 1 addition & 1 deletion ops/abs/abs_13.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
type Abs13 struct{}

// newAbs13 creates a new abs operator.
func NewAbs13() ops.Operator {
func newAbs13() ops.Operator {
return &Abs13{}
}

Expand Down
2 changes: 1 addition & 1 deletion ops/abs/abs_6.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
type Abs6 struct{}

// newAbs6 creates a new abs operator.
func NewAbs6() ops.Operator {
func newAbs6() ops.Operator {
return &Abs6{}
}

Expand Down
10 changes: 10 additions & 0 deletions ops/abs/versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package abs

import (
"github.com/advancedclimatesystems/gonnx/ops"
)

var AbsVersions = ops.OperatorVersions{
6: newAbs6, // Same, but bfloat16 type is added
13: newAbs13,
}
2 changes: 1 addition & 1 deletion ops/acos/acos_7.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
type Acos7 struct{}

// newAcos7 creates a new acos operator.
func NewAcos7() ops.Operator {
func newAcos7() ops.Operator {
return &Acos7{}
}

Expand Down
9 changes: 9 additions & 0 deletions ops/acos/versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package acos

import (
"github.com/advancedclimatesystems/gonnx/ops"
)

var AcosVersions = ops.OperatorVersions{
7: newAcos7,
}
2 changes: 1 addition & 1 deletion ops/acosh/acosh_9.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
type Acosh9 struct{}

// newAcosh9 creates a new acosh operator.
func NewAcosh9() ops.Operator {
func newAcosh9() ops.Operator {
return &Acosh9{}
}

Expand Down
9 changes: 9 additions & 0 deletions ops/acosh/versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package acosh

import (
"github.com/advancedclimatesystems/gonnx/ops"
)

var AcoshVersions = ops.OperatorVersions{
9: newAcosh9,
}
2 changes: 1 addition & 1 deletion ops/add/add_13.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
type Add13 struct{}

// newAdd13 creates a new add operator.
func NewAdd13() ops.Operator {
func newAdd13() ops.Operator {
return &Add13{}
}

Expand Down
2 changes: 1 addition & 1 deletion ops/add/add_7.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
type Add7 struct{}

// newAdd7 creates a new add operator.
func NewAdd7() ops.Operator {
func newAdd7() ops.Operator {
return &Add7{}
}

Expand Down
10 changes: 10 additions & 0 deletions ops/add/versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package add

import (
"github.com/advancedclimatesystems/gonnx/ops"
)

var AddVersions = ops.OperatorVersions{
7: newAdd7, // Same, but bfloat16 type is added
13: newAdd13,
}
2 changes: 1 addition & 1 deletion ops/and/and_7.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var (
type And7 struct{}

// newAnd7 creates a new and operator.
func NewAnd7() ops.Operator {
func newAnd7() ops.Operator {
return &And7{}
}

Expand Down
9 changes: 9 additions & 0 deletions ops/and/versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package and

import (
"github.com/advancedclimatesystems/gonnx/ops"
)

var AndVersions = ops.OperatorVersions{
7: newAnd7,
}
2 changes: 1 addition & 1 deletion ops/argmax/argmax_11.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type ArgMax11 struct {
}

// newArgMax11 creates a new argmax operator.
func NewArgMax11() ops.Operator {
func newArgMax11() ops.Operator {
return &ArgMax11{
keepDims: true,
selectLastIndex: false,
Expand Down
2 changes: 1 addition & 1 deletion ops/argmax/argmax_12.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type ArgMax12 struct {
}

// newArgMax12 creates a new argmax operator.
func NewArgMax12() ops.Operator {
func newArgMax12() ops.Operator {
return &ArgMax12{
keepDims: true,
selectLastIndex: false,
Expand Down
2 changes: 1 addition & 1 deletion ops/argmax/argmax_13.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type ArgMax13 struct {
}

// newArgMax13 creates a new argmax operator.
func NewArgMax13() ops.Operator {
func newArgMax13() ops.Operator {
return &ArgMax13{
keepDims: true,
selectLastIndex: false,
Expand Down
11 changes: 11 additions & 0 deletions ops/argmax/versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package argmax

import (
"github.com/advancedclimatesystems/gonnx/ops"
)

var ArgMaxVersions = ops.OperatorVersions{
11: newArgMax11, // Same, but one attribute is added (which we don't support it anyway)
12: newArgMax12, // Same, but bfloat16 type differs
13: newArgMax13,
}
2 changes: 1 addition & 1 deletion ops/asin/asin_7.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
type Asin7 struct{}

// newSin creates a new asin operator.
func NewAsin7() ops.Operator {
func newAsin7() ops.Operator {
return &Asin7{}
}

Expand Down
9 changes: 9 additions & 0 deletions ops/asin/versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package asin

import (
"github.com/advancedclimatesystems/gonnx/ops"
)

var AsinVersions = ops.OperatorVersions{
7: newAsin7,
}
2 changes: 1 addition & 1 deletion ops/asinh/asinh_9.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
type Asinh9 struct{}

// newAsinh9 creates a new asinh operator.
func NewAsinh9() ops.Operator {
func newAsinh9() ops.Operator {
return &Asinh9{}
}

Expand Down
9 changes: 9 additions & 0 deletions ops/asinh/versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package asinh

import (
"github.com/advancedclimatesystems/gonnx/ops"
)

var AsinhVersions = ops.OperatorVersions{
9: newAsinh9,
}
2 changes: 1 addition & 1 deletion ops/atan/atan_7.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
type Atan7 struct{}

// newAtan7 creates a new atan operator.
func NewAtan7() ops.Operator {
func newAtan7() ops.Operator {
return &Atan7{}
}

Expand Down
9 changes: 9 additions & 0 deletions ops/atan/versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package atan

import (
"github.com/advancedclimatesystems/gonnx/ops"
)

var AtanVersions = ops.OperatorVersions{
7: newAtan7,
}
2 changes: 1 addition & 1 deletion ops/atanh/atanh_9.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
type Atanh9 struct{}

// newAtanh9 creates a new atanh operator.
func NewAtanh9() ops.Operator {
func newAtanh9() ops.Operator {
return &Atanh9{}
}

Expand Down
9 changes: 9 additions & 0 deletions ops/atanh/versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package atanh

import (
"github.com/advancedclimatesystems/gonnx/ops"
)

var AtanhVersions = ops.OperatorVersions{
9: newAtanh9,
}
2 changes: 1 addition & 1 deletion ops/cast/cast_13.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Cast13 struct {
}

// newCast13 creates a new cast operator.
func NewCast13() ops.Operator {
func newCast13() ops.Operator {
return &Cast13{}
}

Expand Down
2 changes: 1 addition & 1 deletion ops/cast/cast_6.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Cast6 struct {
}

// newCast6 creates a new cast operator.
func NewCast6() ops.Operator {
func newCast6() ops.Operator {
return &Cast6{}
}

Expand Down
2 changes: 1 addition & 1 deletion ops/cast/cast_9.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Cast9 struct {
}

// newCast9 creates a new cast operator.
func NewCast9() ops.Operator {
func newCast9() ops.Operator {
return &Cast9{}
}

Expand Down
11 changes: 11 additions & 0 deletions ops/cast/versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package cast

import (
"github.com/advancedclimatesystems/gonnx/ops"
)

var CastVersions = ops.OperatorVersions{
6: newCast6, // Same, but string type is added
9: newCast9, // Same, but bfloat16 type differs
13: newCast13,
}
2 changes: 1 addition & 1 deletion ops/concat/concat_11.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Concat11 struct {
}

// newConcat11 creates a new concat operator.
func NewConcat11() ops.Operator {
func newConcat11() ops.Operator {
return &Concat11{}
}

Expand Down
2 changes: 1 addition & 1 deletion ops/concat/concat_13.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Concat13 struct {
}

// newConcat13 creates a new concat operator.
func NewConcat13() ops.Operator {
func newConcat13() ops.Operator {
return &Concat13{}
}

Expand Down
2 changes: 1 addition & 1 deletion ops/concat/concat_4.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Concat4 struct {
}

// newConcat4 creates a new concat operator.
func NewConcat4() ops.Operator {
func newConcat4() ops.Operator {
return &Concat4{}
}

Expand Down
11 changes: 11 additions & 0 deletions ops/concat/versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package concat

import (
"github.com/advancedclimatesystems/gonnx/ops"
)

var ConcatVersions = ops.OperatorVersions{
4: newConcat4,
11: newConcat11, // Same, but bfloat16 type differs
13: newConcat13,
}
2 changes: 1 addition & 1 deletion ops/constant/constant_1.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Constant1 struct {
}

// newConstant1 creates a new constant operator.
func NewConstant1() ops.Operator {
func newConstant1() ops.Operator {
return &Constant1{}
}

Expand Down
2 changes: 1 addition & 1 deletion ops/constant/constant_11.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Constant11 struct {
}

// newConstant11 creates a new constant operator.
func NewConstant11() ops.Operator {
func newConstant11() ops.Operator {
return &Constant11{}
}

Expand Down
2 changes: 1 addition & 1 deletion ops/constant/constant_12.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Constant12 struct {
}

// newConstant12 creates a new constant operator.
func NewConstant12() ops.Operator {
func newConstant12() ops.Operator {
return &Constant12{}
}

Expand Down
2 changes: 1 addition & 1 deletion ops/constant/constant_13.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Constant13 struct {
}

// newConstant13 creates a new constant operator.
func NewConstant13() ops.Operator {
func newConstant13() ops.Operator {
return &Constant13{}
}

Expand Down
2 changes: 1 addition & 1 deletion ops/constant/constant_9.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Constant9 struct {
}

// newConstant9 creates a new constant operator.
func NewConstant9() ops.Operator {
func newConstant9() ops.Operator {
return &Constant9{}
}

Expand Down
13 changes: 13 additions & 0 deletions ops/constant/versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package constant

import (
"github.com/advancedclimatesystems/gonnx/ops"
)

var ConstantVersions = ops.OperatorVersions{
1: newConstant1,
9: newConstant9,
11: newConstant11,
12: newConstant12, // Same, but bfloat16 type differs
13: newConstant13,
}
2 changes: 1 addition & 1 deletion ops/constantofshape/constant_of_shape_9.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type ConstantOfShape9 struct {
}

// newConstantOfShape9 creates a new constant of shape operator.
func NewConstantOfShape9() ops.Operator {
func newConstantOfShape9() ops.Operator {
return &ConstantOfShape9{}
}

Expand Down
9 changes: 9 additions & 0 deletions ops/constantofshape/versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package constantofshape

import (
"github.com/advancedclimatesystems/gonnx/ops"
)

var ConstantOfShapeVersions = ops.OperatorVersions{
9: newConstantOfShape9,
}
2 changes: 1 addition & 1 deletion ops/conv/conv_1.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type Conv1 struct {
}

// newConv1 creates a new conv operator.
func NewConv1() ops.Operator {
func newConv1() ops.Operator {
return &Conv1{
autoPad: NotSet,
}
Expand Down
Loading

0 comments on commit 095692a

Please sign in to comment.