- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for setInsertionPointToStart (0.59 sec)
-
tensorflow/compiler/mlir/lite/transforms/insert_call_once_op.cc
auto dict_attr = func->getAttrOfType<mlir::DictionaryAttr>("tf.entry_function"); if (!dict_attr) continue; OpBuilder builder(func.getContext()); builder.setInsertionPointToStart(&func.getBlocks().front()); builder.create<TFL::CallOnceOp>(func.getLoc(), init_func_op.getName()); } } } } // namespace
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 01 05:03:09 UTC 2023 - 2.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc
func::FuncOp BuildGELUDecomposition(RankedTensorType type, PatternRewriter& rewriter, Block* insertion_point) { rewriter.setInsertionPointToStart(insertion_point); auto ftype = FunctionType::get(rewriter.getContext(), {type}, {type}); auto name = rewriter.getStringAttr("gelu_decomp"); func::FuncOp new_func = rewriter.create<func::FuncOp>(
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/debug/debug_test.cc
module_ = builder.create<mlir::ModuleOp>(builder.getUnknownLoc()); builder.setInsertionPointToStart(module_->getBody()); auto func = builder.create<mlir::func::FuncOp>( // builder.getUnknownLoc(), "main", builder.getFunctionType({}, {})); func->setAttr("tfl.func", builder.getUnitAttr()); builder.setInsertionPointToStart(func.addEntryBlock()); llvm::SmallVector<int> shape{1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 17 11:15:16 UTC 2024 - 9.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/convert_session_initializer_to_function.cc
// Make savedmodel verification happy. init->setAttr("tf_saved_model.exported_names", builder.getStrArrayAttr({name})); builder.setInsertionPointToStart(init.addEntryBlock()); for (func::FuncOp func : tf_saved_model::GetInitializerFunctions(module)) { if (func.getNumArguments() != 0) { session_initializer->emitWarning(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 01 05:03:09 UTC 2023 - 3.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/freeze_saved_model_assets.cc
continue; } } if (arg_is_deletable) { args_to_erase.set(i); } // Replace the arg with a tf.Const op in the function body. builder.setInsertionPointToStart(&func.getBody().front()); std::string asset_filename = asset.getFilename().str(); std::string filename = tensorflow::io::JoinPath(saved_model_dir, asset_filename);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Jan 30 01:12:09 UTC 2023 - 4.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tfg-to-tfe.cc
FunctionType func_type = rewriter.getFunctionType({}, {}); func::FuncOp func = rewriter.create<func::FuncOp>( loc, kImportModelDefaultGraphFuncName, func_type); rewriter.setInsertionPointToStart(func.addEntryBlock()); auto executor_graph = rewriter.create<tf_executor::GraphOp>(loc, func_type.getResults()); rewriter.inlineRegionBefore(graph.getNodes(), executor_graph.getBody(),
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 21.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/initialize_variables_in_session_init.cc
tensorflow::ConvertTensor(*tensor, &builder); assert(tensor_attr_or.ok() && "Expect valid tensor"); ElementsAttr tensor_attr = tensor_attr_or.value(); builder.setInsertionPointToStart(&session_init_func.getBlocks().front()); auto var_handle_op_in_init = var_handle_op->clone(); builder.insert(var_handle_op_in_init); auto const_op = builder.create<mlir::arith::ConstantOp>(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 23 09:05:47 UTC 2024 - 7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/modify_io_nodes.cc
func::FuncOp func, llvm::SmallVectorImpl<Type>& new_input_types, OpBuilder builder) { if (mlir::isa<FloatType>(input_type)) { return success(); } Block& block = func.front(); builder.setInsertionPointToStart(&block); for (int i = 0; i != block.getNumArguments(); ++i) { Value arg = block.getArgument(0); Type arg_type = arg.getType(); Value new_arg = arg; Location loc = func.getLoc();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/freeze_global_tensors.cc
for (OpOperand &use : user->getOpOperands()) bvector.set(use.getOperandNumber()); } } // Replace the arg with a tf.Const op in the function body. builder.setInsertionPointToStart(&func.getBody().front()); auto const_op = builder.create<TF::ConstOp>(global_tensor.getLoc(), *global_tensor.getValue());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/default_quant_params.cc
Block &block = value.getParentRegion()->front(); Operation *op = value.getDefiningOp(); if (op) { builder.setInsertionPoint(&block, ++Block::iterator(op)); } else { builder.setInsertionPointToStart(&block); } TypeAttr type_attr = TypeAttr::get(new_type); auto quantize = builder.create<TFL::QuantizeOp>(value.getLoc(), new_type, value, type_attr);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.4K bytes - Viewed (0)