README.md
1# Experimental C++ Ops
2
3The C++ files in this directory (***\*_ops.h*** and ***\*_ops.cc***) are
4autogenerated from the registered Op and API definitions.
5
6To regenerate them, run the script in this directory, `update_cpp_ops.sh`, with
7no arguments. This script will overwrite the existing ops in-place at
8***tensorflow/c/experimental/ops/\*_ops.{cc,h}***.
9
10Run this `update_cpp_ops.sh` script when Op definitions change in the registry.
11
12To generate additional operators, extend the lists in this script. Note that
13category names correspond to generated source file names, and should be
14consistent with the original source files registering each operator. For example
15since `REGISTER_OP("MatMul")` appears in ***core/math_ops.cc***, the "MatMul"
16operator in the script should be in the "math" category, and it will be
17generated in the output file `c/experimental/ops/math_ops.cc`.
18
19Running this script should be a no-op, generating identical code other than
20formatting (i.e., line wrapping).
21