- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 43 for ReplaceOpWithNewOp (0.47 sec)
-
tensorflow/compiler/mlir/lite/transforms/reduce_type_precision.cc
auto newAttr = DenseElementsAttr::getFromRawBuffer( shaped_type, mlir::cast<DenseElementsAttr>(op.getValue()).getRawData()); rewriter.replaceOpWithNewOp<arith::ConstantOp>(op, newAttr); return success(); } }; class SanitizeGatherOpOutputToI4 : public OpRewritePattern<TFL::GatherOp> { public: using OpRewritePattern<TFL::GatherOp>::OpRewritePattern;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc
if (ksizes.size() == 4) { rewriter.replaceOpWithNewOp<TF::AvgPoolOp>( op, op.getType(), input, rewriter.getI64ArrayAttr(ksizes), rewriter.getI64ArrayAttr(kstrides), rewriter.getStringAttr(padding), rewriter.getStringAttr(data_format)); return success(); } else if (ksizes.size() == 5) { rewriter.replaceOpWithNewOp<TF::AvgPool3DOp>(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 154.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc
// implemented. if (params_ty.hasStaticShape() && indices_ty.hasStaticShape()) { rewriter.replaceOpWithNewOp<mhlo::GatherOp>( op, op.getType(), op.getParams(), op.getIndices(), dims_attr, GetI64ElementsAttr(slice_sizes, &rewriter)); } else { rewriter.replaceOpWithNewOp<mhlo::DynamicGatherOp>( op, op.getType(), op.getParams(), op.getIndices(), slice_sizes_value,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 11 20:00:43 UTC 2024 - 291.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tpu_model_to_cpu.cc
// which should be removed. So the replaced PartitionedCall op should keep // its original arguments except for the last element. SmallVector<Value> args = call_op.getOperands().drop_back(); rewriter.replaceOpWithNewOp<TF::PartitionedCallOp>( call_op, float_func.getResultTypes(), args, f_attr); return success(); } }; void ConvertTpuModelToCpuPass::runOnOperation() { MLIRContext* ctx = &getContext();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting.cc
// Finally, create a new while with additional return values. hoister.ReplaceOpWithNewOp(); return success(); } // Lift resources out of the regions attached to `op` LogicalResult RegionResourceHoister::ReplaceOpWithNewOp(Operation* op) { if (auto while_op = dyn_cast<TF::WhileRegionOp>(op)) return HoistResourcesOutOfWhileRegion(while_op);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 55.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/ir/ConvertSimQuant.cc
// this is a forced/hard-coded constraint. auto qbarrier = rewriter.create<QuantizeCastOp>(op.getLoc(), quantizedType, op.getInputs()); rewriter.replaceOpWithNewOp<DequantizeCastOp>(op, converter.input_type, qbarrier.getResult()); return false; } }; class ConstFakeQuantRewrite
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 08 02:10:16 UTC 2024 - 6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc
mlir::cast<DenseIntOrFPElementsAttr>(input_values) .mapValues(FloatType::getF32(rewriter.getContext()), llvm::function_ref<DequantizeFuncType>(dequantize_func)); rewriter.replaceOpWithNewOp<TFL::ConstOp>(dequant_op, dequant_op.getType(), dequant_values); return success(); } }; // If the quant op has no consumer, we will remove them.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc
/*keep_dims=*/rewriter.getBoolAttr(true)); if (use_log) { Value log = rewriter.create<TF::LogOp>(loc, sum); rewriter.replaceOpWithNewOp<TF::SubOp>(op, shifted_logits, log); } else { rewriter.replaceOpWithNewOp<TF::DivOp>(op, exp, sum); } return success(); } }; } // namespace void PopulateLoweringTFPatterns(MLIRContext *context,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 74.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/optimize.cc
op.getInput(), new_reshape_shape); TF::ConstOp new_broadcast_shape = GetI64ConstantTensor(rewriter, reshape_shape, op.getLoc()); rewriter.replaceOpWithNewOp<BroadcastToOp>( reshape_op, reshape_op.getOutput().getType(), new_reshape, new_broadcast_shape); return success(); } }; #define GEN_PASS_DEF_TENSORFLOWOPTIMIZEPASS
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h
mlir::ElementsAttr axis_stats; mlir::IntegerAttr axis; for (auto& stats_op : stats_ops) { rewriter.setInsertionPointAfter(stats_op); rewriter.replaceOpWithNewOp<quantfork::StatisticsOp>( stats_op, stats_op.getArg(), layer_stats, axis_stats, axis); } return success(); } }; template <typename SourceOp>
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 03 18:01:23 UTC 2024 - 28K bytes - Viewed (0)