Home
last modified time | relevance | path

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

1234

/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dlower_tf.cc135 auto axis = rewriter.create<ConstOp>( in ValuesToRank1()
247 {ConstOp::getOperationName(), ReshapeOp::getOperationName(), in LowerDynamicStitchOp()
288 auto packed_shape_val = rewriter.create<ConstOp>( in matchAndRewrite()
331 ConstOp::getOperationName(), MulOp::getOperationName(), in ConvertFakeQuantWithMinMaxVarsOp()
356 auto quant_min = rewriter.create<ConstOp>( in matchAndRewrite()
360 auto quant_max = rewriter.create<ConstOp>( in matchAndRewrite()
364 auto quant_diff = rewriter.create<ConstOp>( in matchAndRewrite()
412 auto half_val = rewriter.create<ConstOp>( in matchAndRewrite()
459 {ConstOp::getOperationName(), RangeOp::getOperationName(), in LowerInvertPermutationOp()
477 auto start = rewriter.create<ConstOp>(loc, GetScalarOfType(int_type, 0)); in matchAndRewrite()
[all …]
Dsink_constant.cc39 using ::mlir::TF::ConstOp;
51 llvm::DenseMap<Value, TF::ConstOp> sunk_constant; in runOnFunction()
55 auto const_op = dyn_cast_or_null<TF::ConstOp>(constant.getDefiningOp()); in runOnFunction()
Dlayout_optimization.cc43 Operation* op, ConstOp permutation_op, in ReuseExistingTranspose()
171 auto arg_perm = builder.create<ConstOp>(loc, perm_attr(args_permutation)); in runOnFunction()
180 auto res_perm = builder.create<ConstOp>(loc, perm_attr(res_permutation)); in runOnFunction()
201 ConstOp permutation_op; in MoveTransposeBefore()
212 ConstOp perm = in MoveTransposeBefore()
213 dyn_cast_or_null<ConstOp>(transpose.getOperand(1).getDefiningOp()); in MoveTransposeBefore()
323 ConstOp permutation_op; in MoveTransposeAfter()
336 ConstOp perm = in MoveTransposeAfter()
337 dyn_cast_or_null<ConstOp>(transpose.getOperand(1).getDefiningOp()); in MoveTransposeAfter()
Doptimize.cc38 TF::ConstOp GetI64ConstantTensor(PatternRewriter &rewriter, in GetI64ConstantTensor()
41 return rewriter.create<TF::ConstOp>(location, cst_attr.getType(), cst_attr); in GetI64ConstantTensor()
117 TF::ConstOp new_reshape_shape = GetI64ConstantTensor( in matchAndRewrite()
123 TF::ConstOp new_broadcast_shape = in matchAndRewrite()
Ddecompose_resource_ops.cc93 ConstOp::getOperationName(), in DecomposeRngReadAndSkipOp()
168 Value step_size = rewriter.create<ConstOp>(loc, GetScalarOfType(u64, 256)); in matchAndRewrite()
175 Value zero_u64 = rewriter.create<ConstOp>(loc, GetScalarOfType(u64, 0)); in matchAndRewrite()
176 Value one_u64 = rewriter.create<ConstOp>(loc, GetScalarOfType(u64, 1)); in matchAndRewrite()
198 Value paddings = rewriter.create<ConstOp>( in matchAndRewrite()
Dtpu_space_to_depth_pass.cc175 op.setOperand(1, builder.create<TF::ConstOp>(loc, paddings)); in HandlePad()
226 auto paddings_value = builder->create<TF::ConstOp>(filter.getLoc(), paddings); in GetPadOpForConv2DFilter()
247 builder->create<TF::ConstOp>(input.getLoc(), reshape_sizes); in GetReshapeOpForConv2DFilter()
258 builder->create<TF::ConstOp>(input.getLoc(), permute_attr); in GetTransposeOpForConv2DFilter()
319 auto slice_size_op = builder->create<TF::ConstOp>( in GetSliceOpForConv2DBackPropFilter()
327 auto start_position = builder->create<TF::ConstOp>( in GetSliceOpForConv2DBackPropFilter()
344 auto new_filter_sizes = builder.create<TF::ConstOp>( in HandleConv2DBackPropFilter()
Dlegalize_hlo.cc292 auto start = rewriter.create<ConstOp>(slice_op.getLoc(), start_indices); in matchAndRewrite()
293 auto size = rewriter.create<ConstOp>( in matchAndRewrite()
319 Value clamp_min = rewriter.create<ConstOp>( in matchAndRewrite()
322 Value clamp_max = rewriter.create<ConstOp>( in matchAndRewrite()
341 rewriter.create<ConstOp>(op.getLoc(), op.slice_sizes()); in matchAndRewrite()
633 auto reduction_indices = rewriter.create<ConstOp>( in matchAndRewrite()
736 Value start_op = rewriter.create<TF::ConstOp>(iota_op.getLoc(), start); in matchAndRewrite()
737 Value limit_op = rewriter.create<TF::ConstOp>(iota_op.getLoc(), limit); in matchAndRewrite()
738 Value delta_op = rewriter.create<TF::ConstOp>(iota_op.getLoc(), delta); in matchAndRewrite()
746 Value reshape_shape_op = rewriter.create<TF::ConstOp>( in matchAndRewrite()
[all …]
Dcollection_ops_util.cc46 return builder.create<TF::ConstOp>(loc, attr); in CreateScalarConst()
57 return builder.create<TF::ConstOp>( in GetR1Const()
141 auto max_count_const_op = llvm::dyn_cast<TF::ConstOp>(max_count_op); in CreateInitBufferValue()
248 auto const_op = llvm::dyn_cast<TF::ConstOp>(indices_op); in GetFirstIfIndicesAreContiguous()
Dunroll_batch_matmul.cc73 rewriter.create<TF::ConstOp>(loc, shape_spec_type, constant_attr); in createReshapeOp()
106 auto begin = rewriter.create<TF::ConstOp>(loc, vector3_type, begin_attr); in sliceInput()
107 auto size = rewriter.create<TF::ConstOp>(loc, vector3_type, size_attr); in sliceInput()
Ddecode_constant.cc34 auto tfOp = dyn_cast<ConstOp>(op); in DecodeOpaqueValueInConstantOp()
Dconstant_op_device_assignment.cc43 module.walk([&](TF::ConstOp op) { in runOnOperation()
Dfreeze_global_tensors.cc111 auto const_op = builder.create<TF::ConstOp>(global_tensor.getLoc(), in runOnOperation()
/external/tensorflow/tensorflow/compiler/mlir/tosa/transforms/
Dlegalize_utils.cc186 rewriter.create<tosa::ConstOp>(op->getLoc(), const_type, const_attr); in getTosa1DConstTensorTable()
197 rewriter.create<tosa::ConstOp>(op->getLoc(), const_type, const_attr); in getTosaConstTensorSingleF32()
208 rewriter.create<tosa::ConstOp>(op->getLoc(), const_type, const_attr); in getTosaConstTensorSingleI32()
365 Value get1DConstTensor<tosa::ConstOp, float>(PatternRewriter& rewriter, in get1DConstTensor()
374 rewriter.create<tosa::ConstOp>(op->getLoc(), const_type, const_attr); in get1DConstTensor()
378 template Value get1DConstTensor<tosa::ConstOp, int32_t>(
380 template Value get1DConstTensor<tosa::ConstOp, int64_t>(
382 template Value get1DConstTensor<TFL::ConstOp, int32_t>(
384 template Value get1DConstTensor<TFL::ConstOp, int64_t>(
397 rewriter.create<tosa::ConstOp>(op->getLoc(), const_type, const_attr); in get1DConstTensorInt48()
[all …]
Dconvert_tfl_uint8.cc189 Value tmp_val = builder.create<TFL::ConstOp>( in convert_graph_uint8_tensor()
312 Value tmp_val = builder.create<TFL::ConstOp>( in convert_graph_uint8_tensor()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dconst_op.cc28 class ConstOp : public XlaOpKernel { class
30 explicit ConstOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) { in ConstOp() function in tensorflow::__anone2752b3b0111::ConstOp
128 TF_DISALLOW_COPY_AND_ASSIGN(ConstOp);
133 REGISTER_XLA_OP(Name("Const").CompilationOnly(), ConstOp);
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/IR/
Dlhlo_ops.cc141 struct EraseConstOp : public OpRewritePattern<ConstOp> {
142 using OpRewritePattern<ConstOp>::OpRewritePattern;
144 LogicalResult matchAndRewrite(ConstOp op, in matchAndRewrite()
160 void ConstOp::getCanonicalizationPatterns(OwningRewritePatternList& results, in getCanonicalizationPatterns()
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
Ddense_to_sparse.cc172 if (auto cst = dyn_cast<ConstOp>(inst)) { in InspectWeight()
222 if (auto cst = dyn_cast<ConstOp>(inst)) { in BuildSparsityParameterAttribute()
320 if (isa<ConstOp>(inst)) { in runOnFunction()
322 type = dyn_cast<ConstOp>(inst).getType().cast<ShapedType>(); in runOnFunction()
342 if (auto cst = dyn_cast<ConstOp>(inst)) { in runOnFunction()
Dinitialize_variables.cc43 return rewriter.create<ConstOp>( in GetResourceIDAsI32()
82 builder.create<ConstOp>(session_init.body().getLoc(), value); in InitializeVariable()
Dprepare_tf.cc367 rewriter.create<TF::ConstOp>(op->getLoc(), bias_type, bias_attr); in matchAndRewrite()
422 auto perm_op = rewriter.create<TF::ConstOp>(loc, perm_type, perm_attr); in legalizeFilter()
499 auto shape = rewriter.create<TF::ConstOp>(loc, shape_type, shape_attr); in legalizeFilter()
1140 ::mlir::TF::ConstOp reduce_dim_op; in matchAndRewrite()
1145 reduce_dim_op = rewriter.create<TF::ConstOp>( in matchAndRewrite()
1150 ::mlir::TF::ConstOp rest_size_inv_op; in matchAndRewrite()
1159 rewriter.create<::mlir::TF::ConstOp>(odsLoc, rest_size_inv_attr); in matchAndRewrite()
1211 ::mlir::TF::ConstOp epsilon_const_op; in matchAndRewrite()
1214 rewriter.create<::mlir::TF::ConstOp>(odsLoc, in matchAndRewrite()
1404 auto one = rewriter.create<TF::ConstOp>(rfft_op.getLoc(), one_attr); in matchAndRewrite()
/external/tensorflow/tensorflow/compiler/mlir/xla/transforms/
Dprepare_for_export.cc58 auto cst = b.create<::mlir::mhlo::ConstOp>(attr.getSplatValue()); in runOnFunction()
/external/tensorflow/tensorflow/compiler/mlir/tfr/ir/
Dtfr_ops.cc379 new_cst = rewriter.create<TF::ConstOp>(loc, new_out_type, attr); in matchAndRewrite()
390 new_cst = rewriter.create<TF::ConstOp>(loc, new_out_type, scalar); in matchAndRewrite()
509 rewriter.replaceOpWithNewOp<TFR::ConstOp>(bl_op, array_attr); in matchAndRewrite()
551 OpFoldResult ConstOp::fold(ArrayRef<Attribute> operands) { in fold()
/external/llvm-project/mlir/lib/Dialect/Tosa/IR/
DTosaOps.cpp97 return builder.create<tosa::ConstOp>(loc, type, value.cast<ElementsAttr>()); in materializeConstant()
105 OpFoldResult ConstOp::fold(ArrayRef<Attribute> operands) { in fold()
/external/tensorflow/tensorflow/compiler/mlir/lite/utils/
Dlstm_utils.cc66 return builder->create<TF::ConstOp>(location, type, attr); in CreatTfF32ConstOp()
578 TF::ConstOp Create1DConstantOp(const std::vector<int>& value, Location loc, in Create1DConstantOp()
583 return builder->create<TF::ConstOp>(loc, dense_values); in Create1DConstantOp()
586 TF::ConstOp CreateScalarConstantOp(int value, Location loc, in CreateScalarConstantOp()
588 return builder->create<TF::ConstOp>(loc, builder->getI32IntegerAttr(value)); in CreateScalarConstantOp()
/external/tensorflow/tensorflow/compiler/mlir/hlo/include/mlir-hlo/Dialect/mhlo/transforms/
Dmap_hlo_to_lhlo_op.h47 MAP_HLO_TO_LHLO(ConstOp);
/external/llvm-project/llvm/lib/Target/RISCV/
DRISCVISelDAGToDAG.cpp81 if (auto *ConstOp = dyn_cast<ConstantSDNode>(Node->getOperand(1))) { in Select() local
82 if (!(ConstOp->hasOneUse())) in Select()
85 int64_t Imm = ConstOp->getSExtValue(); in Select()

1234