diff options
Diffstat (limited to 'tensorflow/g3doc')
-rw-r--r-- | tensorflow/g3doc/how_tos/adding_an_op/index.md | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tensorflow/g3doc/how_tos/adding_an_op/index.md b/tensorflow/g3doc/how_tos/adding_an_op/index.md index 38f232104f..7e9e36373c 100644 --- a/tensorflow/g3doc/how_tos/adding_an_op/index.md +++ b/tensorflow/g3doc/how_tos/adding_an_op/index.md @@ -145,8 +145,8 @@ $ g++ -std=c++11 -shared zero_out.cc -o zero_out.so \ ### With TensorFlow source installation If you have TensorFlow sources installed, you can make use of TensorFlow's build -system to compile your Op. The following Bazel build rule would build -`zero_out.so`. +system to compile your Op. Place a BUILD file with following Bazel build rule in +the [`tensorflow/core/user_ops`][user_ops] directory. ```python cc_binary( @@ -164,6 +164,12 @@ cc_binary( ) ``` +Run the following command to build `zero_out.so`. + +```bash +$ bazel build -c opt //tensorflow/core/user_ops:zero_out.so +``` + ## Using the Op in Python TensorFlow Python API provides the |