C++ API changes
- Marked control flow ops as hidden Change: 146300232
This commit is contained in:
parent
f494a979af
commit
339fdd8249
@ -20,6 +20,15 @@ op { name: "Where" input_rename: { from: "input" to: "condition" } }
|
||||
|
||||
# candidate_sampling_ops
|
||||
# control_flow_ops
|
||||
op { name: "Switch" hide: true }
|
||||
op { name: "Merge" hide: true }
|
||||
op { name: "RefMerge" hide: true }
|
||||
op { name: "Exit" hide: true }
|
||||
op { name: "RefExit" hide: true }
|
||||
op { name: "Enter" hide: true }
|
||||
op { name: "RefEnter" hide: true }
|
||||
op { name: "RefIdentity" hide: true }
|
||||
|
||||
# ctc_ops
|
||||
# data_flow_ops
|
||||
op { name: "FakeQueue" skip: true }
|
||||
|
@ -220,6 +220,7 @@ cc_test(
|
||||
":compilation_passes",
|
||||
":xla_local_launch_op",
|
||||
"//tensorflow/cc:cc_ops",
|
||||
"//tensorflow/cc:cc_ops_internal",
|
||||
"//tensorflow/cc:function_ops",
|
||||
"//tensorflow/cc:ops",
|
||||
"//tensorflow/compiler/tf2xla:xla_compiler",
|
||||
|
@ -16,6 +16,7 @@ limitations under the License.
|
||||
#include "tensorflow/compiler/jit/mark_for_compilation_pass.h"
|
||||
|
||||
#include "tensorflow/cc/framework/ops.h"
|
||||
#include "tensorflow/cc/ops/control_flow_ops_internal.h"
|
||||
#include "tensorflow/cc/ops/standard_ops.h"
|
||||
#include "tensorflow/core/framework/node_def_util.h"
|
||||
#include "tensorflow/core/framework/op.h"
|
||||
@ -337,9 +338,9 @@ TEST(XlaCompilationTest, Loops) {
|
||||
auto a = ops::Placeholder(root.WithOpName("A"), DT_FLOAT);
|
||||
auto b = ops::Placeholder(root.WithOpName("B"), DT_FLOAT);
|
||||
auto c = ops::Add(root.WithOpName("C"), a, b);
|
||||
auto enter = ops::Enter(root, c, "aframe");
|
||||
auto enter = ops::internal::Enter(root, c, "aframe");
|
||||
auto next_iter = ops::NextIteration(root, enter);
|
||||
auto exit = ops::Exit(root, next_iter);
|
||||
auto exit = ops::internal::Exit(root, next_iter);
|
||||
auto d = ops::Add(root.WithOpName("D"), c, exit);
|
||||
|
||||
std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global()));
|
||||
|
@ -1844,6 +1844,7 @@ tf_cc_tests(
|
||||
":test_main",
|
||||
":testlib",
|
||||
"//tensorflow/cc:cc_ops",
|
||||
"//tensorflow/cc:cc_ops_internal",
|
||||
"//tensorflow/cc:scope",
|
||||
"//tensorflow/cc:sendrecv_ops",
|
||||
"//tensorflow/core/kernels:ops_util",
|
||||
|
@ -20,6 +20,7 @@ limitations under the License.
|
||||
#include "tensorflow/cc/ops/array_ops.h"
|
||||
#include "tensorflow/cc/ops/const_op.h"
|
||||
#include "tensorflow/cc/ops/control_flow_ops.h"
|
||||
#include "tensorflow/cc/ops/control_flow_ops_internal.h"
|
||||
#include "tensorflow/cc/ops/random_ops.h"
|
||||
#include "tensorflow/cc/ops/sendrecv_ops.h"
|
||||
#include "tensorflow/core/framework/op.h"
|
||||
@ -337,8 +338,10 @@ TEST_F(GraphPartitionTest, CrossDevice_DataControl) {
|
||||
TEST_F(GraphPartitionTest, CrossDeviceLoop) {
|
||||
using namespace ::tensorflow::ops; // NOLINT(build/namespaces)
|
||||
auto a1 = BoolInput(in_.WithOpName("A1"));
|
||||
auto a2 = Enter(in_.WithOpName("A2"), a1, "foo");
|
||||
auto a3 = Merge(in_.WithOpName("A3"), {a2, Input("A5", 0, DT_BOOL)}).output;
|
||||
auto a2 = ::tensorflow::ops::internal::Enter(in_.WithOpName("A2"), a1, "foo");
|
||||
auto a3 = ::tensorflow::ops::internal::Merge(in_.WithOpName("A3"),
|
||||
{a2, Input("A5", 0, DT_BOOL)})
|
||||
.output;
|
||||
LoopCond(in_.WithOpName("A4"), a3);
|
||||
auto b1 = Identity(in_.WithOpName("B1"), a3);
|
||||
NextIteration(in_.WithOpName("A5"), b1);
|
||||
@ -349,8 +352,10 @@ TEST_F(GraphPartitionTest, CrossDeviceLoop) {
|
||||
TEST_F(GraphPartitionTest, CrossDeviceLoop1) {
|
||||
using namespace ::tensorflow::ops; // NOLINT(build/namespaces)
|
||||
auto a1 = BoolInput(in_.WithOpName("A1"));
|
||||
auto a2 = Enter(in_.WithOpName("B2"), a1, "foo");
|
||||
auto a3 = Merge(in_.WithOpName("A3"), {a2, Input("B5", 0, DT_BOOL)}).output;
|
||||
auto a2 = ::tensorflow::ops::internal::Enter(in_.WithOpName("B2"), a1, "foo");
|
||||
auto a3 = ::tensorflow::ops::internal::Merge(in_.WithOpName("A3"),
|
||||
{a2, Input("B5", 0, DT_BOOL)})
|
||||
.output;
|
||||
LoopCond(in_.WithOpName("A4"), a3);
|
||||
auto b1 = Identity(in_.WithOpName("B1"), a3);
|
||||
NextIteration(in_.WithOpName("B5"), b1);
|
||||
|
@ -254,7 +254,7 @@ def tf_gen_op_wrappers_cc(name,
|
||||
]),
|
||||
copts=tf_copts(),
|
||||
alwayslink=1,
|
||||
visibility=["//visibility:private"])
|
||||
visibility=["//tensorflow:internal"])
|
||||
|
||||
# Invoke this rule in .../tensorflow/python to build the wrapper library.
|
||||
def tf_gen_op_wrapper_py(name, out=None, hidden=None, visibility=None, deps=[],
|
||||
|
Loading…
Reference in New Issue
Block a user