You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Change the working directory to the base of the cloned TensorFlow repository,
@@ -121,10 +122,20 @@ Instead, follow these instructions.***
121
122
$ go mod init github.com/tensorflow/tensorflow
122
123
```
123
124
124
-
- Patch tensorflow/go/genop to generate TSL protobufs.
125
+
- Patch protos to declare Go package.
126
+
127
+
```sh
128
+
$ sed -i '4 i option go_package = "github.com\/tensorflow\/tensorflow\/tensorflow\/go\/core\/framework\/dataset_go_proto";' tensorflow/core/framework/dataset.proto
129
+
$ sed -i '4 i option go_package = "github.com\/tensorflow\/tensorflow\/tensorflow\/go\/core\/framework\/optimized_function_graph_go_proto";' tensorflow/core/framework/optimized_function_graph.proto
130
+
$ sed -i '4 i option go_package = "github.com\/google\/tsl\/tsl\/go\/core\/protobuf\/for_core_protos_go_proto";;' tensorflow/tsl/protobuf/test_log.proto
131
+
```
132
+
133
+
- Patch tensorflow/go/genop to generate TF and TSL protobufs.
125
134
126
135
```sh
127
-
$ sed -i '72 i \ ${TF_DIR}\/tensorflow\/tsl\/protobuf\/*.proto \\' tensorflow/go/genop/generate.sh
136
+
$ sed -i '71d;72d' tensorflow/go/genop/generate.sh
137
+
$ sed -i '71 i \ ${TF_DIR}\/tensorflow\/tsl\/protobuf\/*.proto \\' tensorflow/go/genop/generate.sh
138
+
$ sed -i '72 i \ ${TF_DIR}\/tensorflow\/compiler\/xla\/stream_executor\/dnn.proto; do' tensorflow/go/genop/generate.sh
128
139
```
129
140
130
141
- Generate wrappers and protocol buffers.
@@ -171,7 +182,7 @@ workspace for `/go` in the command below:
171
182
```sh
172
183
$ go mod init hello-world
173
184
$ go mod edit -require github.com/google/tsl@v0.0.0+incompatible
174
-
$ go mod edit -require github.com/tensorflow/tensorflow@v2.11.0+incompatible
185
+
$ go mod edit -require github.com/tensorflow/tensorflow@v2.12.0+incompatible
175
186
$ go mod edit -replace github.com/google/tsl=/go/src/github.com/google/tsl
176
187
$ go mod edit -replace github.com/tensorflow/tensorflow=/go/src/github.com/tensorflow/tensorflow
177
188
$ go mod tidy
@@ -219,7 +230,7 @@ func main() {
219
230
```sh
220
231
$ go mod init app
221
232
$ go mod edit -require github.com/google/tsl@v0.0.0+incompatible
222
-
$ go mod edit -require github.com/tensorflow/tensorflow@v2.11.0+incompatible
233
+
$ go mod edit -require github.com/tensorflow/tensorflow@v2.12.0+incompatible
223
234
$ go mod edit -replace github.com/google/tsl=/go/src/github.com/google/tsl
224
235
$ go mod edit -replace github.com/tensorflow/tensorflow=/go/src/github.com/tensorflow/tensorflow
0 commit comments