- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for replaceMap (0.17 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/gpu_fusion.cc
rewriter.replaceOp(batch_norm, op->getResults()); // Depending on the case, we may fuse the add, the relu, or both. if (!add_op || add_op.getZ().hasOneUse()) { // We fuse the Relu only if the add has a single use, otherwise we only // fuse the add itself. op->setAttr("activation_mode", rewriter.getStringAttr("Relu")); rewriter.replaceOp(relu_op, op->getResult(0)); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Nov 03 12:35:38 UTC 2022 - 5.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tpu_model_to_cpu.cc
// TODO(b/267700110): Handle multiple input/output cases. rewriter.replaceOp(replicated_input_op, replicated_input_op.getInputs()); } else if (auto replicated_output_op = dyn_cast_or_null<TF::TPUReplicatedOutputOp>(op)) { // TODO(b/267700110): Handle multiple input/output cases. rewriter.replaceOp(replicated_output_op, replicated_output_op.getInput()); } else { return failure();
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/lite/stablehlo/transforms/legalize_hlo_conversions/reduce.h
auto tf_argreduce_op = rewriter.create<ArgReduce>( reduce_op.getLoc(), reduce_op->getResult(1).getType(), operand, reduction_indices); rewriter.replaceOp(reduce_op, {tf_reduce_op, tf_argreduce_op}); } else { auto tf_reduce_op = rewriter.create<Reduce>( reduce_op.getLoc(), reduce_op->getResult(0).getType(), operand, reduction_indices,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/optimize_layout.cc
pad_op.getPaddingValue(), new_padding_low, new_padding_high, new_padding_interrier); Value orig_pad = CreateTranspose(rewriter, new_pad, transpose_perm); rewriter.replaceOp(pad_op, orig_pad); return success(); } }; // Transform reduce_window(transpose(x)) to transpose(reduce_window(x)) struct TransposeCommuteWithReduceWindow
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 21:59:06 UTC 2024 - 8.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/custom_call.cc
TFL::ConstBytesAttr::get(rewriter.getContext(), stringattr)); } } else { tfl_custom.setCustomOptionAttr( TFL::ConstBytesAttr::get(rewriter.getContext(), "")); } rewriter.replaceOp(mhlo_custom_call, tfl_custom); return success(); } std::optional<bool> IsCustomCallLegal(mhlo::CustomCallOp op) { if (op.getCallTargetName().starts_with("custom_call.")) { auto bc = op.getBackendConfig();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 2.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tf_data_optimization.cc
num_parallel_calls_op.getY(), op.getDropRemainder(), batchInputOp.getF(), op.getOutputTypes(), op.getOutputShapes(), batchInputOp.getPreserveCardinality(), op.getMetadata()); rewriter.replaceOp(op, {fused_op.getHandle()}); return failure(); } }; #include "tensorflow/compiler/mlir/tensorflow/transforms/generated_tf_data_optimization.inc" } // namespace
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Nov 03 12:35:38 UTC 2022 - 2.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/fuse_convolution_pass.cc
conv_op.getFeatureGroupCount(), conv_op.getBatchGroupCount(), conv_op.getPrecisionConfigAttr()); // For static case, replace the convolution op now. if (!is_dynamic_broadcast) { rewriter.replaceOp(mul_op, {new_conv}); } else { // For dynamic case, create new shape_of op and replace uses. shape_of_op = dyn_cast_or_null<mhlo::DynamicBroadcastInDimOp>(bcast_or_const_op)
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Feb 22 22:21:19 UTC 2024 - 8.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/remove_identity_op_pattern.cc
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 15 06:13:49 UTC 2023 - 1.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_func_to_bfloat16.cc
DenseFPElementsAttr::get( mlir::dyn_cast<ShapedType>(const_op.getValue().getType()) .clone(rewriter.getBF16Type()), bfloat16_values)); } rewriter.replaceOp(op, rewriter.create(state)->getResults()); return success(); } }; class BitcastConvertOpPattern : public OpConversionPattern<mlir::stablehlo::BitcastConvertOp> { public:
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/convert_tf_control_flow_to_scf.cc
createScfThenOrElse(else_region, scf_if_op.getElseRegion(), tf_if_region_return_type, rewriter); // Replace the `tf.IfRegion` op with the results of the `scf.if` op. rewriter.replaceOp(op, scf_if_op.getResults()); return success(); } }; /// Convert the `tf.WhileRegion` op to the `scf.while` op. class ConvertWhileRegionOp : public OpRewritePattern<WhileRegionOp> { public:
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Nov 03 12:35:38 UTC 2022 - 9.4K bytes - Viewed (0)