- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 56 for hasOneUse (0.21 sec)
-
tensorflow/compiler/mlir/tfr/passes/rewrite_quantized_io.cc
Type arg_type = arg.getType(); if (auto quant_type = arg_type.cast<TensorType>() .getElementType() .dyn_cast<quant::QuantizedType>()) { if (arg.hasOneUse() && llvm::isa<TFR::CastOp>(*arg.user_begin())) { arg.setType( arg_type.cast<TensorType>().clone(quant_type.getStorageType())); } else { std::string error_message;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jun 08 01:19:25 UTC 2023 - 4.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.td
// Checks if the boolean value is false. def IsFalseBoolAttr : AttrConstraint< CPred<"!$_self.cast<BoolAttr>().getValue()">>; // Checks if the value has only one user. def HasOneUse : Constraint<CPred<"$0.hasOneUse()">>; // Gets the type of a value. def GetValueType : NativeCodeCall<"$0.getType()">; // Checks if the value has the type of int8. def IsInt8ElementType : Constraint<
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 08 04:55:44 UTC 2024 - 6.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/post_quantize.cc
quantize_output.replaceAllUsesWith(new_arg); quantize_op.erase(); arg.dropAllUses(); bb.eraseArgument(0); }; // This is looking for a pattern: arg -> tfl.quantize if (arg.hasOneUse() && llvm::isa<QuantizeOp>(*arg.user_begin())) { auto quantize_op = llvm::cast<QuantizeOp>(*arg.user_begin()); remove_quantize_op(quantize_op); continue; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_patterns.td
(TF_TransposeOp:$transpose_out1 $input, (Arith_ConstantOp:$permutation1 $p1)), (Arith_ConstantOp:$permutation2 $p2)), (TF_TransposeOp $input, (Arith_ConstantOp (RemapPermutation $permutation1, $permutation2))), [(HasOneUse $transpose_out1)]>; // Pattern to fuse trivial reshape op into transpose op def FoldTrivialReshapeIntoTranspose : Pat< (TF_ReshapeOp:$output
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 00:40:15 UTC 2024 - 10.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize.cc
// - gather_nd->transpose->gather_nd->transpose. if (!gather_nd_first->hasOneUse()) return failure(); auto transpose_first = dyn_cast_or_null<TFL::TransposeOp>(*(gather_nd_first->user_begin())); if (!transpose_first || !transpose_first->hasOneUse()) return failure(); auto gather_nd_second = dyn_cast_or_null<TFL::GatherNdOp>(*(transpose_first->user_begin()));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 00:40:15 UTC 2024 - 102.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/xla_rewrite_util.cc
assert(user->use_empty()); user->erase(); } } } for (auto operand : cluster.getOperands()) { mlir::Operation* def = operand.getDefiningOp(); if (operand.hasOneUse() && llvm::isa_and_nonnull<mlir::TF::TPUPartitionedInputV2Op>(def)) { operand.dropAllUses(); def->erase(); } } if (!old_parallel_execute->use_empty()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 13 03:57:18 UTC 2023 - 4.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_quantize.cc
// in the function while list. if (target_func != func_name && !llvm::is_contained(quantize_allowlist_, func_name)) { return false; } auto has_quantize_op = [&](const Value arg) { return (arg.hasOneUse() && llvm::isa<quantfork::QuantizeCastOp>(*arg.user_begin())); }; bool need_to_set_input_nodes_quantization_params = false; for (const BlockArgument arg : func.getArguments()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/remove_unused_while_results.cc
if (!cond_block_argument.use_empty()) return false; // Don't prune if `body_yield_operand` has more than one use (that would mean // it feeds into another op apart from `Yield`). if (!body_yield_operand.hasOneUse()) return false; // Don't prune if any other result of the candidate op is used. for (Value candidate_result : candidate_op->getResults()) { if (candidate_result == body_yield_operand) continue;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Nov 16 01:49:07 UTC 2022 - 5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc
// if there is only one. Operation* GetUserIfOnlyOne(Operation* op) { if (op->getNumResults() != 1) return nullptr; auto result = op->getResult(0); if (!result.hasOneUse()) return nullptr; return (*result.getUses().begin()).getOwner(); } // Gets operation providing value for the given operand of given operation // if the given operation is the only user.
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/lite/transforms/prepare_quantize_helper.h
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 03 18:01:23 UTC 2024 - 28K bytes - Viewed (0)