/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/ |
D | lower_tf.cc | 135 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 …]
|
D | sink_constant.cc | 39 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()
|
D | layout_optimization.cc | 43 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()
|
D | optimize.cc | 38 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()
|
D | decompose_resource_ops.cc | 93 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()
|
D | tpu_space_to_depth_pass.cc | 175 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()
|
D | legalize_hlo.cc | 292 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 …]
|
D | collection_ops_util.cc | 46 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()
|
D | unroll_batch_matmul.cc | 73 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()
|
D | decode_constant.cc | 34 auto tfOp = dyn_cast<ConstOp>(op); in DecodeOpaqueValueInConstantOp()
|
D | constant_op_device_assignment.cc | 43 module.walk([&](TF::ConstOp op) { in runOnOperation()
|
D | freeze_global_tensors.cc | 111 auto const_op = builder.create<TF::ConstOp>(global_tensor.getLoc(), in runOnOperation()
|
/external/tensorflow/tensorflow/compiler/mlir/tosa/transforms/ |
D | legalize_utils.cc | 186 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 …]
|
D | convert_tfl_uint8.cc | 189 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/ |
D | const_op.cc | 28 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/ |
D | lhlo_ops.cc | 141 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/ |
D | dense_to_sparse.cc | 172 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()
|
D | initialize_variables.cc | 43 return rewriter.create<ConstOp>( in GetResourceIDAsI32() 82 builder.create<ConstOp>(session_init.body().getLoc(), value); in InitializeVariable()
|
D | prepare_tf.cc | 367 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/ |
D | prepare_for_export.cc | 58 auto cst = b.create<::mlir::mhlo::ConstOp>(attr.getSplatValue()); in runOnFunction()
|
/external/tensorflow/tensorflow/compiler/mlir/tfr/ir/ |
D | tfr_ops.cc | 379 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/ |
D | TosaOps.cpp | 97 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/ |
D | lstm_utils.cc | 66 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/ |
D | map_hlo_to_lhlo_op.h | 47 MAP_HLO_TO_LHLO(ConstOp);
|
/external/llvm-project/llvm/lib/Target/RISCV/ |
D | RISCVISelDAGToDAG.cpp | 81 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()
|