- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 178 for func_ops (0.24 sec)
-
tensorflow/compiler/mlir/quantization/stablehlo/passes/replace_stablehlo_ops_in_main_function_with_xla_call_module_ops.cc
func::FuncOp main_func = FindMainFuncOp(module_op); if (!main_func) return; // In case the model has tf.StatefulPartitionedCallOp or tf.PartitionedCallOp, // we recursively find called functions and process StableHLO ops in them. SmallVector<func::FuncOp> func_ops; func_ops.push_back(main_func); int stablehlo_func_id = -1; while (!func_ops.empty()) { auto main_func = func_ops.back();
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/quantization/tensorflow/passes/merge_save_function_ops_to_main.cc
}; // Returns true iff func_op has either no Region or the body has no Blocks. bool IsFuncOpEmpty(func::FuncOp func_op) { return func_op->getNumRegions() == 0 || func_op.getBody().empty(); } // Gets the GraphOp from the function op. Returns an empty op iff it doesn't // exist. GraphOp GetGraphOpFromFuncOp(func::FuncOp func_op) { if (IsFuncOpEmpty(func_op)) return {};
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/quantization/common/lift_as_function_call.cc
return false; } SmallVector<func::FuncOp> GetSortedFunctions(ModuleOp module_op) { auto iterator_range = module_op.getOps<func::FuncOp>(); SmallVector<func::FuncOp> func_ops(iterator_range.begin(), iterator_range.end()); absl::c_sort(func_ops, [](func::FuncOp op1, func::FuncOp op2) { return op1.getName() < op2.getName(); }); return func_ops; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 21.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/resource_device_inference.cc
getAnalysis<TF::ResourceAliasAnalysis>(); llvm::SmallDenseMap<func::FuncOp, PerFunctionResult, 4> per_function_results; llvm::SetVector<func::FuncOp> worklist; for (auto func_op : module.getOps<func::FuncOp>()) { worklist.insert(func_op); per_function_results.try_emplace( func_op, func_op, resource_alias_analysis.GetAnalysisForFunc(func_op)); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 03 03:47:00 UTC 2023 - 13.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_tf_xla_call_module_to_stablehlo_pass.cc
} return failure(); } }; namespace { bool IsShloMainFuncOp(func::FuncOp func_op) { if (func_op == nullptr) { return false; } if (!func_op.getSymName().contains(kStablehloModuleDefaultEntryFuncName)) { return false; } if (func_op.getSymVisibility() == "nested" || func_op.getSymVisibility() == "private") { return false; } return true; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jan 25 09:43:18 UTC 2024 - 10.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_main_function.cc
// function. bool ShouldIncludeInMainFunction(func::FuncOp func_op) { return !func_op.isPrivate() && IsExported(func_op) && IsEntryFunction(func_op); } // Sets a function to be private so it can be referred internally. void SetFunctionPrivate(func::FuncOp func) { func.setVisibility(SymbolTable::Visibility::Private);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 16.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc
} Value func_input_arg; // Creates a function. func::FuncOp func_op = PrepareFunctionRegister( rewriter, input_val, result_type, unique_func_name, func_input_arg); // Fills the body. Operation* last_op_in_func = quantization_operations_func(rewriter, func_op.getOperation(), func_input_arg, result_type, quant_type);
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/cluster_tf_ops_pass.cc
ModuleOp module_op = getOperation(); SmallVector<func::FuncOp, 4> original_func; for (auto func_op : module_op.getOps<func::FuncOp>()) { original_func.push_back(func_op); } for (auto func_op : original_func) { std::optional<llvm::StringMap<FunctionMetadata>> metadatas = GetFunctionMetadatas(func_op); if (!metadatas) { signalPassFailure(); return;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 13.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_freeze_variables.cc
// Builder builder(func_op.getContext()); func_op->setAttr( kTfInputShapesAttr, ArrayAttr::get(func_op.getContext(), updated_input_shapes_attr)); } } // Validates func ops. Returns `failure` if the function is invalid. LogicalResult ValidateFuncOp(func::FuncOp func_op) { auto input_shapes_attr = func_op->getAttrOfType<ArrayAttr>(kTfInputShapesAttr);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 09:56:53 UTC 2024 - 19.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/uniform_quantized_types_test.cc
ASSERT_TRUE(module_op); auto func_op = module_op->lookupSymbol<func::FuncOp>("fully_quantized_add"); ASSERT_THAT(func_op, NotNull()); auto add_op_itr = func_op.getBody().op_begin<mlir::stablehlo::AddOp>(); ASSERT_THAT(add_op_itr, Ne(func_op.getBody().op_end<mlir::stablehlo::AddOp>())); EXPECT_TRUE(IsOpFullyQuantized(*add_op_itr)); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 28.8K bytes - Viewed (0)