- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 73 for BlockArgument (0.55 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_outline_tpu_island.cc
// created entry block arguments in the function body. { Block &entry_block = outlined_func.getBody().front(); auto loc = outlined_func.getLoc(); for (Value operand : operands) { BlockArgument newArg = entry_block.addArgument(operand.getType(), loc); replaceAllUsesInRegionWith(operand, newArg, outlined_func.getBody()); } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_resource_partitioning.cc
if (auto* resource_op = resource.getDefiningOp()) { return resource_op->getAttr(kDeviceAttr); } else { const auto resource_arg = resource.dyn_cast_or_null<BlockArgument>(); if (resource_arg && (resource_arg.getOwner() == &(func.front()))) { return func.getArgAttrOfType<mlir::StringAttr>( resource_arg.getArgNumber(), kFuncDeviceAttr); } else {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Sep 06 19:12:29 UTC 2023 - 11.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_save_op.cc
} TF::ConstOp tensor_names_const = CreateTensorNamesConst(tensor_names, builder); TF::ConstOp shape_and_slices_const = CreateShapeAndSlicesConst(tensor_names.size(), builder); BlockArgument filename_arg = save_func.getArgument(0); return builder.create<TF::SaveV2Op>( NameLoc::get(builder.getStringAttr(kTfQuantSaveV2OpName)), /*prefix=*/filename_arg, tensor_names_const, shape_and_slices_const,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 22 05:52:39 UTC 2024 - 9.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc
if (!arg.hasOneUse() || !mlir::isa<TF::ResourceType>(getElementTypeOrSelf(arg.getType()))) { continue; } auto block_arg = mlir::dyn_cast<BlockArgument>(arg); if (!block_arg || block_arg.getOwner() != &replicate.GetBody()) continue; assert(replicate_arg_to_execute_arg.count(block_arg.getArgNumber()) == 0 &&
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 21.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_weights.cc
} return success(); } private: // Check if op's user or op's user after an identity op is connected to a // terminator. bool checkIfAnyUserIsConnectedToTermiantor(BlockArgument op) const { for (const auto& user : op.getUsers()) { if (user->template hasTrait<OpTrait::IsTerminator>()) return true; if (auto next_user = dyn_cast_or_null<TF::IdentityOp>(user)) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 05 07:39:40 UTC 2024 - 11.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc
// if the given operation is the only user. Operation* GetInputOpWithOneUse(Operation* op, int opr_num) { if (opr_num >= op->getNumOperands()) return nullptr; auto opr = op->getOperand(opr_num); if (llvm::isa<BlockArgument>(opr)) return nullptr; auto* res = opr.getDefiningOp(); if (!res->hasOneUse()) return nullptr; return res; } // Checks if the given operand of given operation refers to a splat constant // with given val.
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/quantization_patterns.h
return failure(); } Operation* operand_op = operand.getDefiningOp(); if (operand_op == nullptr) { // When `QuantizeOpT`'s operand does not have a defining op, it means it // is a `BlockArgument`. The pattern does not match if there is no op to // quantize. return failure(); } if (operand_op->hasTrait<OpTrait::ConstantLike>()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_device_propagation.cc
return new_device; } // Propagates devices from function arguments. void PropagateDevicesFromArguments( func::FuncOp func, llvm::DenseMap<Value, llvm::StringRef>& value_to_device) { for (BlockArgument& arg : func.getArguments()) { auto arg_device_attr = func.getArgAttrOfType<StringAttr>(arg.getArgNumber(), kFuncDeviceAttr); if (!arg_device_attr || arg_device_attr.getValue().empty() ||
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/prepare_tpu_computation_for_tf_export.cc
constexpr char kShardingAttr[] = "mhlo.sharding"; if (auto sharding = func.getArgAttrOfType<mlir::StringAttr>(i, kShardingAttr)) { if (!sharding.getValue().empty()) { BlockArgument arg = func.getArgument(i); // TODO(hinsu): Instead of setting both 'sharding' and '_XlaSharding' // attributes, only set the 'sharding' attribute. Both attributes are
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/analysis/resource_alias_analysis.cc
// the result cannot be backtracked to a region argument, returns // std::nullopt. std::optional<int> GetArg(int result_index) const { if (auto arg = mlir::dyn_cast<BlockArgument>(GetValue(result_index))) if (arg.getParentBlock() == ®ion_->front()) return arg.getArgNumber(); return std::nullopt; } private: friend class detail::BacktrackAnalysis;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 15 09:04:13 UTC 2024 - 28.2K bytes - Viewed (0)