Skip to content

Commit 6a2f2a2

Browse files
authored
Merge pull request #9 from ajroetker/dynamic-tensor-sizes
Add dynamic dimension support to Shape and shape inference
2 parents 45cd77a + 14d71a6 commit 6a2f2a2

15 files changed

Lines changed: 2071 additions & 408 deletions

File tree

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ require (
1818
github.com/go-logr/logr v1.4.3 // indirect
1919
github.com/pascaldekloe/name v1.0.0 // indirect
2020
github.com/streadway/quantile v0.0.0-20220407130108-4246515d968d // indirect
21-
golang.org/x/mod v0.27.0 // indirect
22-
golang.org/x/sync v0.16.0 // indirect
21+
golang.org/x/mod v0.29.0 // indirect
22+
golang.org/x/sync v0.17.0 // indirect
2323
golang.org/x/sys v0.39.0 // indirect
24-
golang.org/x/tools v0.36.0 // indirect
24+
golang.org/x/tools v0.38.0 // indirect
2525
)
2626

2727
tool github.com/dmarkham/enumer

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf
2020
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
2121
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
2222
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
23-
golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ=
24-
golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc=
25-
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
26-
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
23+
golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA=
24+
golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w=
25+
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
26+
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
2727
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
2828
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
2929
golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q=
3030
golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg=
31-
golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg=
32-
golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s=
31+
golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ=
32+
golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs=
3333
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
3434
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
3535
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

internal/optypes/gen_optype_enumer.go

Lines changed: 288 additions & 284 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/optypes/optypes.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const (
4949
Fft
5050
Floor
5151
Gather
52+
If
5253
Imag
5354
IsFinite
5455
Iota
@@ -83,13 +84,17 @@ const (
8384
Sign
8485
Sine
8586
Slice
87+
Sort
8688
Sqrt
8789
Subtract
8890
Tan
8991
Tanh
9092
Transpose
93+
While
9194
Xor
9295

96+
GetDimensionSize
97+
9398
// Here the ones not implemented yet, please add an issue in the repo if you need them.
9499

95100
AllGather
@@ -105,9 +110,7 @@ const (
105110
DynamicIota
106111
DynamicPad
107112
DynamicReshape
108-
GetDimensionSize
109113
GetTupleElement
110-
If
111114
Infeed
112115
OptimizationBarrier
113116
Outfeed
@@ -120,7 +123,6 @@ const (
120123
Tuple
121124
UniformDequantize
122125
UniformQuantize
123-
While
124126

125127
// Last should always be kept the last, it is used as a counter/marker for .
126128
Last

0 commit comments

Comments
 (0)