Home
last modified time | relevance | path

Searched refs:shape_op (Results 1 – 16 of 16) sorted by relevance

/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dreplicate_invariant_op_hoisting.cc77 Block* replicate_block, TF::ShapeOp shape_op) { in MakeShapeOpInvariant() argument
78 Value input = shape_op.input(); in MakeShapeOpInvariant()
84 shape_op.setOperand(replicate_op.GetReplicaOperandForBlockArgument( in MakeShapeOpInvariant()
106 OpBuilder builder(shape_op); in MakeShapeOpInvariant()
108 shape_op.getLoc(), shape_op.getType(), in MakeShapeOpInvariant()
111 shape_op.replaceAllUsesWith(new_shape_op.getOperation()); in MakeShapeOpInvariant()
112 shape_op.erase(); in MakeShapeOpInvariant()
158 replicate_op.walk([&](TF::ShapeOp shape_op) { in HoistReplicateInvariantOps() argument
159 MakeShapeOpInvariant(replicate_op, num_replicas, replicate_block, shape_op); in HoistReplicateInvariantOps()
Dtpu_rewrite_pass.cc380 auto shape_op = builder->create<TF::ShapeOp>( in BuildCompileOp() local
384 compile_op_operands.emplace_back(shape_op.getResult()); in BuildCompileOp()
Dtensor_list_ops_decomposition.cc537 auto shape_op = shape_value.getDefiningOp(); in GetConstShapeValue() local
538 if (!shape_op) return failure(); in GetConstShapeValue()
539 auto shape_const_op = llvm::dyn_cast<TF::ConstOp>(shape_op); in GetConstShapeValue()
/external/tensorflow/tensorflow/c/experimental/ops/
Darray_ops.cc63 AbstractOperationPtr shape_op(ctx->CreateOperation()); in Shape() local
64 TF_RETURN_IF_ERROR(shape_op->Reset("Shape", /*raw_device_name=*/nullptr)); in Shape()
65 TF_RETURN_IF_ERROR(MaybeSetOpName(shape_op.get(), name)); in Shape()
66 TF_RETURN_IF_ERROR(shape_op->AddInput(inputs[0])); // input in Shape()
68 TF_RETURN_IF_ERROR(shape_op->Execute(outputs, &num_retvals)); in Shape()
/external/tensorflow/tensorflow/compiler/mlir/tfr/ir/
Dtfr_ops.cc439 LogicalResult matchAndRewrite(GetShapeOp shape_op, in matchAndRewrite()
441 Operation *preceding_op = shape_op.arg().getDefiningOp(); in matchAndRewrite()
444 rewriter.replaceOpWithNewOp<shape::ShapeOfOp>(shape_op, cast_op.arg()); in matchAndRewrite()
/external/tensorflow/tensorflow/c/eager/
Dc_api_experimental_test.cc455 TFE_Op* shape_op = ShapeOp(ctx, hgpu); in TEST() local
456 TFE_OpSetDevice(shape_op, gpu_device_name.c_str(), status.get()); in TEST()
460 TFE_Execute(shape_op, &retvals[0], &num_retvals, status.get()); in TEST()
471 TFE_DeleteOp(shape_op); in TEST()
Dc_api_test.cc573 TFE_Op* shape_op = ShapeOp(ctx, hgpu); in TEST() local
574 TFE_OpSetDevice(shape_op, gpu_device_name.c_str(), status.get()); in TEST()
578 TFE_Execute(shape_op, &retvals[0], &num_retvals, status.get()); in TEST()
593 TFE_DeleteOp(shape_op); in TEST()
/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dpropagate_array_data_types.cc81 auto* shape_op = static_cast<TensorFlowShapeOperator*>(op); in Run() local
82 SetDataTypeForAllOutputs(model, op, shape_op->output_data_type); in Run()
/external/tensorflow/tensorflow/compiler/tests/
Dunary_ops_test.py995 shape_op = lambda x: array_ops.shape_internal(x, optimize=False) function
998 shape_op, dtype(7), expected=np.array([], dtype=np.int32))
1000 shape_op,
1004 shape_op,
1008 shape_op,
1012 shape_op,
/external/tensorflow/tensorflow/tools/graph_transforms/
Dfold_old_batch_norms_test.cc395 Output shape_op = in TestFoldFusedBatchNormsWithConcat() local
398 Concat(root.WithOpName("concat_op"), {conv0_op, conv1_op}, shape_op); in TestFoldFusedBatchNormsWithConcat()
Dquantize_nodes_test.cc373 Output shape_op = in TestQuantizeConcat() local
386 Concat(root.WithOpName("concat_op"), {a_op, b_op}, shape_op); in TestQuantizeConcat()
/external/tensorflow/tensorflow/compiler/mlir/lite/
Dflatbuffer_import.cc684 auto shape_op = builder.create<tfl::ConstOp>(loc, output_shape); in ConvertOp() local
685 op_state.addOperands({shape_op}); in ConvertOp()
745 auto shape_op = builder.create<tfl::ConstOp>(loc, output_shape); in ConvertOp() local
746 op_state.operands[1] = shape_op; in ConvertOp()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/ir/
Dtf_ops_n_z.cc238 auto shape_op = dyn_cast_or_null<ShapeOp>(slice_op.input().getDefiningOp()); in fold() local
239 if (!shape_op) return {}; in fold()
242 Value tensor = shape_op.input(); in fold()
1908 auto shape_op = input().getDefiningOp<ShapeOp>(); in fold() local
1909 if (!shape_op) { in fold()
1929 auto tensor_ty = shape_op.input().getType().dyn_cast<RankedTensorType>(); in fold()
/external/tensorflow/tensorflow/lite/toco/
Dexport_tensorflow.cc1310 tensorflow::NodeDef* shape_op = tensorflow_graph->add_node(); in ConvertTensorFlowShapeOperator() local
1311 shape_op->set_op("Shape"); in ConvertTensorFlowShapeOperator()
1312 shape_op->set_name(src_op.outputs[0]); in ConvertTensorFlowShapeOperator()
1314 *shape_op->add_input() = src_op.inputs[0]; in ConvertTensorFlowShapeOperator()
1315 (*shape_op->mutable_attr())["T"].set_type( in ConvertTensorFlowShapeOperator()
1317 (*shape_op->mutable_attr())["out_type"].set_type( in ConvertTensorFlowShapeOperator()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
DBUILD99 "shape_op.cc",
/external/tensorflow/tensorflow/compiler/mlir/xla/transforms/
Dlegalize_tf.cc5477 auto shape_op = rewriter.create<shape::ShapeOfOp>(op.getLoc(), input); in matchAndRewrite() local
5486 op.getLoc(), index_tensor, shape_op); in matchAndRewrite()