Home
last modified time | relevance | path

Searched refs:cast_op (Results 1 – 25 of 25) sorted by relevance

/external/tensorflow/tensorflow/compiler/mlir/tfr/passes/
Draise_to_tf.cc126 CastOp cast_op, Type input_tfr_type) const { in CastToNonDerivedType() argument
128 if (!tensor_type) return cast_op.arg(); in CastToNonDerivedType()
131 if (attr_names.empty() || attr_names.size() > 1) return cast_op.arg(); in CastToNonDerivedType()
133 if (!fixed_elt_type_attrs_.contains(tfr_type_attr)) return cast_op.arg(); in CastToNonDerivedType()
145 return cast_op.arg(); in CastToNonDerivedType()
149 cast_op.getInputElementType().cast<TypeAttr>().getValue(); in CastToNonDerivedType()
152 return rewriter.create<TF::CastOp>(loc, result_type, cast_op.arg()); in CastToNonDerivedType()
154 return cast_op.arg(); in CastToNonDerivedType()
251 if (auto cast_op = dyn_cast_or_null<CastOp>(input_op)) { in CollectInputsAndAttributes() local
253 cast_op, input_tfr_type); in CollectInputsAndAttributes()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dtpu_space_to_depth_pass.cc129 LogicalResult HandleCast(TF::CastOp cast_op, ArrayRef<int64_t> new_shape) { in HandleCast() argument
130 auto cast_input = cast_op.x(); in HandleCast()
184 if (auto cast_op = dyn_cast_or_null<TF::CastOp>(input.getDefiningOp())) in HandlePad() local
185 if (failed(HandleCast(cast_op, transform_shape))) return failure(); in HandlePad()
550 auto cast_op = dyn_cast_or_null<TF::CastOp>(next_input.getDefiningOp()); in GetInputBlockArgNum() local
552 while (pad_op || cast_op) { in GetInputBlockArgNum()
558 auto block_arg_num = GetBlockArgNum(cast_op.x()); in GetInputBlockArgNum()
560 next_input = cast_op.x(); in GetInputBlockArgNum()
563 cast_op = dyn_cast_or_null<TF::CastOp>(next_input.getDefiningOp()); in GetInputBlockArgNum()
Dregion_control_flow_to_functional.cc223 while (auto cast_op = in MatchCallArgs() local
228 if (cast_op.SrcT() != cast_op.DstT()) { in MatchCallArgs()
231 value = cast_op.getOperand(); in MatchCallArgs()
Dshape_inference.cc645 TF::CastOp cast_op; in UpdateTypeAndInsertIncompatibleUseCasts() local
647 if (!cast_op) { in UpdateTypeAndInsertIncompatibleUseCasts()
651 cast_op = b.create<TF::CastOp>(op->getLoc(), result.getType(), result, in UpdateTypeAndInsertIncompatibleUseCasts()
654 return Value(cast_op); in UpdateTypeAndInsertIncompatibleUseCasts()
1060 if (auto cast_op = dyn_cast<CastOp>(op)) return InferShapeForCast(cast_op); in InferShapeForSingleOperation() local
1481 if (auto cast_op = dyn_cast_or_null<CastOp>(arg_defining_op)) { in InferShapeForFunctionReturnType() local
1482 Value input = cast_op.x(); in InferShapeForFunctionReturnType()
1483 Value result = cast_op.y(); in InferShapeForFunctionReturnType()
1488 cast_op.getResult().getType().print(llvm::errs()); in InferShapeForFunctionReturnType()
1489 cast_op.getOperand().getType().print(llvm::errs() << " to "); in InferShapeForFunctionReturnType()
[all …]
Dtensor_array_ops_decomposition.cc167 auto cast_op = in ReplaceAllUsesWithCast() local
170 old_val.replaceAllUsesWith(cast_op); in ReplaceAllUsesWithCast()
/external/python/pybind11/include/pybind11/
Dstl.h80 value.insert(cast_op<Key &&>(std::move(conv))); in load()
116 value.emplace(cast_op<Key &&>(std::move(kconv)), cast_op<Value &&>(std::move(vconv))); in load()
156 value.push_back(cast_op<Value &&>(std::move(conv))); in load()
222 value[ctr++] = cast_op<Value &&>(std::move(conv));
285 value.emplace(cast_op<typename T::value_type &&>(std::move(inner_caster)));
344 value = cast_op<U>(caster);
Dcast.h950 template <typename T> typename make_caster<T>::template cast_op_type<T> cast_op(make_caster<T> &cas…
954 cast_op(make_caster<T> &&caster) {
981 operator std::reference_wrapper<type>() { return cast_op<type &>(subcaster); }
1468 …type implicit_cast(index_sequence<Is...>) & { return type(cast_op<Ts>(std::get<Is>(subcasters))...…
1470 …type implicit_cast(index_sequence<Is...>) && { return type(cast_op<Ts>(std::move(std::get<Is>(subc…
1747 return cast_op<T>(load_type<T>(handle));
1823 return cast_op<T>(load_type(caster, o));
2042 return std::forward<Func>(f)(cast_op<Args>(std::move(std::get<Is>(argcasters)))...);
/external/tensorflow/tensorflow/compiler/mlir/tfr/ir/
Dtfr_ops.cc404 LogicalResult matchAndRewrite(CastOp cast_op, in matchAndRewrite()
407 llvm::dyn_cast_or_null<CastOp>(cast_op.arg().getDefiningOp()); in matchAndRewrite()
413 Type output_type = cast_op.getType(); in matchAndRewrite()
418 rewriter.replaceOp(cast_op, {input}); in matchAndRewrite()
428 rewriter.replaceOpWithNewOp<TF::EnsureShapeOp>(cast_op, output_type, in matchAndRewrite()
442 if (auto cast_op = llvm::dyn_cast_or_null<CastOp>(preceding_op)) { in matchAndRewrite() local
444 rewriter.replaceOpWithNewOp<shape::ShapeOfOp>(shape_op, cast_op.arg()); in matchAndRewrite()
/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dresolve_constant_unary.cc188 CastOperator const* cast_op = static_cast<CastOperator const*>(unary_op); in Run() local
189 if (cast_op->dst_data_type != ArrayDataType::kFloat) { in Run()
196 if (cast_op->src_data_type != input_array.buffer->type) { in Run()
Dpropagate_array_data_types.cc111 auto* cast_op = static_cast<CastOperator*>(op); in Run() local
112 model->GetArray(op->outputs[0]).data_type = cast_op->dst_data_type; in Run()
/external/tensorflow/tensorflow/compiler/xla/python/
Dabsl_casters.h54 storage.push_back(cast_op<T&&>(std::move(conv)));
/external/tensorflow/tensorflow/core/graph/
Dgraph_partition.cc216 const string cast_op = (host_memory) ? "_HostCast" : "Cast"; in AddSend() local
217 NodeDefBuilder cast_builder(opts.new_name(src->name()), cast_op, in AddSend()
313 const string cast_op = (host_memory) ? "_HostCast" : "Cast"; in AddRecv() local
314 NodeDefBuilder cast_builder(opts.new_name(src->name()), cast_op, in AddRecv()
/external/tensorflow/tensorflow/core/kernels/linalg/
DBUILD97 "//tensorflow/core/kernels:cast_op",
/external/tensorflow/tensorflow/core/kernels/image/
DBUILD292 deps = IMAGE_DEPS + ["//tensorflow/core/kernels:cast_op"],
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/transforms/
Dlegalize_to_linalg.cc868 Value cast_op = nested_builder.create<IndexCastOp>( in matchAndRewrite() local
873 cast_op = nested_builder.create<SIToFPOp>(nested_loc, cast_op, in matchAndRewrite()
876 nested_builder.create<linalg::YieldOp>(nested_loc, cast_op); in matchAndRewrite()
/external/tensorflow/tensorflow/core/common_runtime/
DBUILD2053 "//tensorflow/core/kernels:cast_op",
2083 "//tensorflow/core/kernels:cast_op",
2140 "//tensorflow/core/kernels:cast_op",
2416 "//tensorflow/core/kernels:cast_op",
2453 "//tensorflow/core/kernels:cast_op",
/external/tensorflow/tensorflow/core/grappler/optimizers/data/
DBUILD387 "//tensorflow/core/kernels:cast_op",
998 "//tensorflow/core/kernels:cast_op",
/external/tensorflow/tensorflow/lite/toco/
Dexport_tensorflow.cc1189 tensorflow::NodeDef* cast_op = tensorflow_graph->add_node(); in ConvertCastOperator() local
1190 cast_op->set_op("Cast"); in ConvertCastOperator()
1191 cast_op->set_name(src_op.outputs[0]); in ConvertCastOperator()
1193 *cast_op->add_input() = src_op.inputs[0]; in ConvertCastOperator()
1195 (*cast_op->mutable_attr())["DstT"].set_type( in ConvertCastOperator()
1197 (*cast_op->mutable_attr())["SrcT"].set_type( in ConvertCastOperator()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
DBUILD23 "cast_op.cc",
/external/tensorflow/tensorflow/core/common_runtime/eager/
DBUILD239 "//tensorflow/core/kernels:cast_op",
/external/tensorflow/tensorflow/core/kernels/
DBUILD3260 ":cast_op",
3330 name = "cast_op",
3333 prefix = "cast_op",
3334 …_mlir_experimental_kernels_enabled(if_true = ["//tensorflow/core/kernels/mlir_generated:cast_op"]),
3451 ":cast_op",
3865 ":cast_op",
5765 "cast_op.cc",
5766 "cast_op.h",
/external/tensorflow/tensorflow/core/distributed_runtime/
DBUILD129 "//tensorflow/core/kernels:cast_op",
/external/tensorflow/tensorflow/core/kernels/mlir_generated/
DBUILD326 name = "cast_op",
/external/tensorflow/tensorflow/
Dtensorflow.bzl1501 For example, with prefix = "cast_op",
1502 * srcs = ["cast_op.cc"]
1503 * hdrs = ["cast_op.h"]
1504 * gpu_srcs = ["cast_op_gpu.cu.cc", "cast_op.h"]
/external/tensorflow/tensorflow/core/
DBUILD764 "//tensorflow/core/kernels:cast_op",