Merge pull request #37411 from bbbboom:master
PiperOrigin-RevId: 326069177 Change-Id: I375d4076152892d784aeffe93d0a32a190f703d2
This commit is contained in:
commit
a7229659a6
21
tensorflow/go/genop/generate.go
Normal file
21
tensorflow/go/genop/generate.go
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright 2020 The TensorFlow Authors. All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Package stub file for non-Windows builds.
|
||||
|
||||
//go:generate bash generate.sh
|
||||
|
||||
package main
|
@ -24,6 +24,16 @@ then
|
||||
GOPATH=$(go env GOPATH)
|
||||
fi
|
||||
|
||||
# convert GOPATH's Windows style to UNIX style
|
||||
if [ $1 == "win" ]; then
|
||||
# eg: convert "D:\go-14;D:\go-13" to "D\go-14;D\go-13"
|
||||
GOPATH=${GOPATH//:\\/\\}
|
||||
# eg: convert "D\go-14;D\go-13" to "\D\go-14:\D\go-13"
|
||||
GOPATH=\\${GOPATH//;/:\\}
|
||||
# eg: convert "\D\go-14:\D\go-13" to "/D/go-14:/D/go-13"
|
||||
GOPATH=${GOPATH//\\/\/}
|
||||
fi
|
||||
|
||||
cd $(dirname $0)
|
||||
for g in $(echo "${GOPATH//:/ }"); do
|
||||
TF_DIR="${g}/src/github.com/tensorflow/tensorflow"
|
||||
|
21
tensorflow/go/genop/generate.win.go
Normal file
21
tensorflow/go/genop/generate.win.go
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright 2020 The TensorFlow Authors. All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Package stub file for Windows builds.
|
||||
|
||||
//go:generate bash generate.sh win
|
||||
|
||||
package main
|
@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
//go:generate bash generate.sh
|
||||
|
||||
// Command genop generates a Go source file with functions for TensorFlow ops.
|
||||
package main
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user