- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 60 for BlockArgument (0.16 sec)
-
tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_save_function_ops_to_main.cc
// "inputs" key. BlockArgument CreateFilePrefixArg(func::FuncOp main_func_op) { Builder builder(main_func_op); // Add a new argument of type `tensor<!tf_type.string>` and update the // function type. auto file_prefix_arg_type = RankedTensorType::get(/*shape=*/{}, builder.getType<TF::StringType>()); BlockArgument new_file_prefix_arg =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/xla_rewrite.cc
}; void MoveResourceArgsToEnd(func::FuncOp callee) { llvm::DenseMap<BlockArgument, BlockArgument> mapping; unsigned num_params = callee.getNumArguments(); llvm::BitVector removed_params(num_params); // Copy the resource-type parameters to the end. for (unsigned i = 0; i < num_params; ++i) { BlockArgument param = callee.getArgument(i); if (mlir::isa<TF::ResourceType>(getElementTypeOrSelf(param.getType()))) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 4.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/lower_globals_to_ml_program.cc
static LogicalResult traceUpwardsToArgument(Value v, llvm::DenseSet<Value> seen, BlockArgument *out) { if (seen.contains(v)) { return failure(); // infinite loop } seen.insert(v); if (auto blockArg = mlir::dyn_cast<BlockArgument>(v)) { Operation *op = blockArg.getOwner()->getParentOp(); // If we're in the first block, then the argument to that block is the
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/analysis/resource_dataflow.cc
ResourceConstructingOps ResourceConstructingOps::EntryState( MLIRContext *context) { return ResourceConstructingOps(); } ResourceConstructingOps ResourceConstructingOps::EntryState(Value value) { if (auto barg = mlir::dyn_cast<BlockArgument>(value)) { if (func::FuncOp func = dyn_cast<func::FuncOp>(barg.getOwner()->getParentOp())) { SymbolTable symbol_table(func->getParentOfType<ModuleOp>());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_host_computation_expansion.cc
return op->getAttrOfType<StringAttr>(kXlaOutsideCompilationAttr) != nullptr; } // Finds op that created a given value. If the value is a BlockArgument, this // returns the owner of the Block. Operation* GetOpOfValue(Value value) { if (auto block_arg = mlir::dyn_cast<BlockArgument>(value)) return block_arg.getOwner()->getParentOp(); return value.getDefiningOp(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/push_transpose_through_ewise.cc
if (tpose_arg1_type.getRank() != tpose_arg2_type.getRank()) { return failure(); } if (llvm::isa<BlockArgument>(tpose_arg1.getPerm()) || llvm::isa<BlockArgument>(tpose_arg2.getPerm())) { return failure(); } auto perm1 = llvm::dyn_cast_or_null<arith::ConstantOp>( tpose_arg1.getPerm().getDefiningOp());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 12.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_annotate_dynamic_shape_inputs.cc
TPUAnnotateDynamicShapeInputsPass> { void runOnOperation() override; }; // Finds op that created a given value. If the value is a BlockArgument, this // returns the owner of the Block. Operation* GetOpOfValue(Value value) { if (auto block_arg = mlir::dyn_cast<BlockArgument>(value)) return block_arg.getOwner()->getParentOp(); return value.getDefiningOp(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_space_to_depth_pass.cc
// Update input type. auto transform_result_type = RankedTensorType::get(new_shape, getElementTypeOrSelf(cast_input)); cast_input.setType(transform_result_type); auto block_arg = mlir::dyn_cast<mlir::BlockArgument>(cast_input); auto cast_op_input = dyn_cast_or_null<TF::CastOp>(cast_input.getDefiningOp()); while (block_arg || cast_op_input) { if (block_arg) { // Change on device function type/shape.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 29.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/promote_resources_to_args.cc
// `tf.ReadVariableOp` and `tf.AssignVariableOp` only. mlir::LogicalResult ValidateResourceArgument(func::FuncOp function, BlockArgument resource_arg, TF::ResourceType resource_type) { if (resource_type.getSubtypes().size() != 1) return function.emitError() << "expects resource type of argument "
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/tpu_dynamic_layout_pass.cc
return false; llvm::SmallSetVector<Value, 8> aliases = resource_alias_analysis.GetResourceAliases(resource_iterator); auto is_generator = [](Value val) { if (mlir::isa<BlockArgument>(val)) return true; Operation* definition = val.getDefiningOp(); return definition->getNumOperands() == 0 && definition->getNumResults() == 1; };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 12.7K bytes - Viewed (0)