- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 157 for getUses (0.25 sec)
-
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. Operation* GetInputOpWithOneUse(Operation* op, int opr_num) {
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/common/quantization_lib/quantization_driver.cc
// Unsure if this check is required. if (state.pos != pos) { return; } } if (pos == RequantizeState::ON_OUTPUT) { Operation* user = value.getUses().begin().getUser(); if (isa<quantfork::QuantizeCastOp>(user)) { // The requantize op is inserted between `quantize` and `dequantize` ops. value = user->getResult(0); builder_.setInsertionPointAfter(user);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 38.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.cc
} std::optional<RankedTensorType> GetElementTypeFromAccess( Value collection, ModuleOp module, llvm::function_ref<std::optional<Type>(Operation*)> infer_from_op) { for (auto& use : collection.getUses()) { if (auto while_op = llvm::dyn_cast<TF::WhileOp>(use.getOwner())) { auto body = while_op.body_function(); assert(body); auto type_from_body = GetElementTypeFromAccess(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 14.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc
// updated in the function. llvm::SmallSet<int, 4> indexes; for (BlockArgument &arg : func.getArguments()) { if (tensor_list_args.contains(arg.getArgNumber())) { for (const mlir::OpOperand &use : arg.getUses()) { mlir::Operation *op = use.getOwner(); // Currently we only check if the tensorlist argument is consumed by // `TensorListPushBack` or `TensorListResize`, since those are the only
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 11 20:00:43 UTC 2024 - 70.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_program_key.cc
Value GetResultInBlock(Value value, llvm::DenseSet<Block*> target_blocks) { while (target_blocks.find(value.getParentBlock()) == target_blocks.end()) { Value new_value = nullptr; for (OpOperand& operand : value.getUses()) { Operation* owner = operand.getOwner(); if (!llvm::isa<tf_device::ReturnOp>(owner)) continue; Operation* parent = owner->getParentOp(); // op that owns the "return"
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/promote_resources_to_args.cc
} return_operands.push_back(resource.live_value); result_types.push_back(resource.live_value.getType()); } if (is_var_handle && !resource.read) { assert(block.getArgument(index).getUses().empty()); argument_indices_to_remove.push_back(index); } else { if (is_var_handle) { // Add resource_name attribute to VarHandleOp read. function.setArgAttr(
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/tensorflow/transforms/executor_island_coarsening.cc
for (Operation* user : island.getControl().getUsers()) { DCHECK_EQ(user->getParentOp(), graph); try_update_current_candidate(user); } // Check island data results. Block& graph_body = llvm::cast<GraphOp>(graph).GetBody(); for (Value result : island.getOutputs()) { for (Operation* user : result.getUsers()) { Operation* def = graph_body.findAncestorOpInBlock(*user);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 19.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/replace_stablehlo_ops_in_main_function_with_xla_call_module_ops.cc
if (constant_op.getValue().getNumElements() > 32) continue; while (!constant_op.getResult().hasOneUse()) { auto new_constant_op = builder.clone(*constant_op.getOperation()); constant_op.getResult().getUses().begin()->assign( dyn_cast<mlir::stablehlo::ConstantOp>(new_constant_op)); } } } void ReplaceStablehloOpsInMainFunctionWithXlaCallModuleOpsPass:: runOnOperation() {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 21K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_executor.cc
if (op.getNumOperands() != 0 || op.getNumResults() != 1 || !HasSingleOpInBlock<YieldOp>(&op.GetBody())) return failure(); for (auto &use : llvm::make_early_inc_range(op.getControl().getUses())) use.getOwner()->eraseOperand(use.getOperandNumber()); rewriter.eraseOp(op); return success(); } };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 42.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/dilated_conv.h
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 20K bytes - Viewed (0)