- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 106 for eraseOp (0.19 sec)
-
tensorflow/compiler/mlir/tfr/passes/canonicalize.cc
inline_point->getResults(), loc, /*shouldCloneInlinedRegion=*/true))) { return failure(); } // If the inlining was successful then erase the scf.if op. rewriter.eraseOp(inline_point); return success(); } } // namespace void populateCanonicalizationPatterns(func::FuncOp func, RewritePatternSet &patterns) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Jan 14 22:15:06 UTC 2023 - 6.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc
rewriter.replaceAllOpUsesWith(output_mul, composite_op); // Note these must be erased in reverse topo order to avoid // failing in debug mode. rewriter.eraseOp(output_mul); rewriter.eraseOp(rhs_add); rewriter.eraseOp(op); rewriter.eraseOp(lhs_mul); rewriter.eraseOp(rhs_mul); return success(); } }; class OutlineCompositesPass
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 9.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/merge_fusion_with_dequantize.cc
.replaceAllUsesWith(new_call_op.getResult(0)); users_to_erase.push_back(user); } for (auto user : users_to_erase) rewriter.eraseOp(user); rewriter.eraseOp(call_op); func_op.eraseResult(0); func_op.insertResult(0, new_call_op.getResult(0).getType(), /*resultAttrs=*/nullptr);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/tensorflow/tf_to_quant.cc
id1.replaceAllUsesWith(id1.getInput()); min = tf_op.getMin(); rewriter.eraseOp(id1); } if (auto id2 = dyn_cast_or_null<TF::IdentityOp>(max.getDefiningOp())) { id2.replaceAllUsesWith(id2.getInput()); max = tf_op.getMax(); rewriter.eraseOp(id2); } if (!matchPattern(min, m_Constant(&min_value))) return failure();
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/quantization/tensorflow/passes/remove_var_init_by_const.cc
PatternRewriter& rewriter) const override { // `TF::ConstOp` and `TF::VarHandleOp` are not manually erased. // `applyPatternsAndFoldGreedily` performs dead code elimination and unsed // ops will be erased during the optimization. rewriter.eraseOp(assign_op); } }; void RemoveVariableInitializationByConstPass::runOnOperation() { MLIRContext& ctx = getContext();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Feb 03 12:04:03 UTC 2023 - 4.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_custom_aggregation_op_to_quant_stats.cc
// When there are no min and max attributes, remove op. if (min == nullptr || max == nullptr) { op.getOutput().replaceAllUsesWith(op.getInput()); rewriter.eraseOp(op); return success(); } // The layer stats contain only the first min/max pairs. ElementsAttr layer_stats = DenseFPElementsAttr::get( RankedTensorType::get({2}, rewriter.getF32Type()),
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 4.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/init_text_file_to_import.cc
rewriter.create<LookupTableImportV2Op>(op.getLoc(), op.getTableHandle(), key_constant_tensor, value_constant_tensor); rewriter.eraseOp(op); return success(); } private: StringRef saved_model_dir_; }; void InitTextFileToImportPass::runOnOperation() { RewritePatternSet patterns(&getContext());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Nov 03 12:35:38 UTC 2022 - 6.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize_functional_ops.cc
// TODO(jpienaar): Remove once recusive side-effects are supported. if (op.use_empty() && (op.getIsStateless() || (IsSideEffectFree(then_func) && IsSideEffectFree(else_func)))) { rewriter.eraseOp(op.getOperation()); return success(); } // Extract the constant cond value. DenseElementsAttr cond; if (!matchPattern(op.getCond(), m_Constant(&cond))) return failure();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc
LogicalResult matchAndRewrite(TFL::QuantizeOp quant_op, PatternRewriter& rewriter) const override { if (!quant_op.getResult().use_empty()) return failure(); rewriter.eraseOp(quant_op); return success(); } }; void OptimizeQuantizedOpToFloat(func::FuncOp func, MLIRContext* context) { RewritePatternSet patterns(func.getContext()); patterns
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/convert_tf_control_flow_to_scf.cc
TypeRange block_arguments_type, PatternRewriter& rewriter) { // If `destination_block` isn't empty, erase its terminator to ensure that it // never contains two terminator-like ops after merging. if (!destination_block->empty()) rewriter.eraseOp(destination_block->getTerminator()); destination_block->addArguments( block_arguments_type,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Nov 03 12:35:38 UTC 2022 - 9.4K bytes - Viewed (0)