- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 29 for getFunctionType (1.2 sec)
-
tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc
SmallVectorImpl<Value>* inputs, NamedAttrList* arg_attrs, llvm::StringMap<Attribute>* derived_attrs) const { for (const auto& operand : llvm::enumerate(signature.getFunctionType().getInputs())) { // If the index is larger than the operand number of the call_op, the // default value of the operand needs to be used. if (operand.index() >= call_op.getNumOperands()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 21.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc
rewriter.create<func::FuncOp>(input_op->getLoc(), func_name, func_type); OpBuilder::InsertionGuard guard = OpBuilder::InsertionGuard(rewriter); ArrayRef<Type> inputs = quantization_func.getFunctionType().getInputs(); Block* block = rewriter.createBlock( &quantization_func.getBody(), quantization_func.begin(), inputs, SmallVector<Location>(inputs.size(), quantization_func.getLoc()));
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/tfr/ir/tfr_ops.td
mlir::Region *getCallableRegion(); /// Returns the argument types of this function. ArrayRef<Type> getArgumentTypes() { return getFunctionType().getInputs(); } /// Returns the result types of this function. ArrayRef<Type> getResultTypes() { return getFunctionType().getResults(); } // Get the names of all defined attributes, including both derived and // non-derived ones.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 22 10:54:29 UTC 2024 - 17.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/decompose_optionals.cc
for (auto ret_op : ret->getOperands()) { return_types.push_back(ret_op.getType()); } auto newType = FunctionType::get(rewriter.getContext(), argument_types, return_types); if (f.getFunctionType() == newType) { return failure(); } rewriter.modifyOpInPlace(f, [&] { f.setType(newType); }); // Adjust the type of the return values callers of the function to
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Jun 12 21:18:05 UTC 2024 - 9.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc
// at the end? int first_tensor = -1, last_tensor = -1, first_tensor_list = -1, last_tensor_list = -1, first_attr = -1; for (auto arg : llvm::enumerate(func.getFunctionType().getInputs())) { Type arg_type = arg.value(); if (auto tensor = arg_type.dyn_cast<TFRTensorType>()) { if (first_tensor == -1) { first_tensor = arg.index(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Nov 21 16:55:41 UTC 2023 - 38.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/convert_control_to_data_outputs.cc
func.getRegion().addArgument(chaining_data_type, func.getLoc()); } FunctionType ftype = FunctionType::get(func.getContext(), func.getBody().getArgumentTypes(), func.getFunctionType().getResults()); func.setType(ftype); } // Appends function results with `num_resources` number of results of requested // type. void AppendFunctionResults(func::FuncOp func, int num_resources,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 28.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_save_function_ops_to_main.cc
SmallVector<Type> input_types(main_func_op.getArgumentTypes()); input_types.emplace_back(file_prefix_arg_type); main_func_op.setType( builder.getFunctionType(input_types, main_func_op.getResultTypes())); // Add "__tf_file_prefix" to the "tf_saved_model.index_path" attribute for the // newly created argument. main_func_op.setArgAttr(new_file_prefix_arg.getArgNumber(),
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/tensor_array_ops_decomposition.cc
(*stats)[grad_var].accumulate_on_write = true; } } } OpBuilder builder(while_op); auto new_while = builder.create<TF::WhileOp>( while_op.getLoc(), body.getFunctionType().getInputs(), operands, while_op->getAttrs()); for (int64_t i = 0; i < while_op.getNumOperands(); ++i) { if (ta_arg_buffer_type(i)) { while_op.getResult(i).replaceAllUsesWith(while_op.getOperand(i));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Mar 02 20:41:19 UTC 2023 - 40.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc
mlir::func::FuncOp main_func = module.lookupSymbol<mlir::func::FuncOp>("main"); TF_RET_CHECK(main_func != nullptr) << "No main function found"; mlir::FunctionType func_type = main_func.getFunctionType(); int num_args = func_type.getNumInputs(); xla_input_shapes->reserve(num_args); std::vector<xla::Shape> individual_arg_shapes; individual_arg_shapes.reserve(num_args);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 21 17:24:39 UTC 2024 - 45.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/decompose_reduce_dataset.cc
// 3. Captures inputs. // The number of dataset inputs can be indirectly determined to be // total_number_of_inputs - state_inputs - captured_inputs. auto func_inputs = reduce_func.getFunctionType().getInputs(); const int func_input_size = func_inputs.size(); const int argument_size = reduce_dataset->getAttrOfType<ArrayAttr>("Targuments").size(); const int state_size =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 14K bytes - Viewed (0)