- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 201 for constop (0.1 sec)
-
tensorflow/compiler/mlir/quantization/tensorflow/passes/unfreeze_constants.cc
// shared_name mapping. The shared_name is the shared name of the corresponding // VarHandleOp. llvm::MapVector<TF::ConstOp, std::string> ReplaceConstOpUsesWithVariableReads( llvm::ArrayRef<TF::ConstOp> target_const_ops) { llvm::MapVector<TF::ConstOp, std::string> const_op_name_map{}; // Keeps track of the number of occurrences of each synthesized name. The
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Aug 16 15:04:53 UTC 2023 - 14K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/cc/const_op_size_test.cc
MLIRContext ctx_; }; TF::ConstOp ParseConstOp(const absl::string_view const_op_str, Block& block, MLIRContext& ctx) { const LogicalResult parse_result = parseSourceString(const_op_str, &block, ParserConfig(&ctx)); EXPECT_TRUE(succeeded(parse_result)); auto const_op = dyn_cast_or_null<TF::ConstOp>(block.front()); EXPECT_TRUE(const_op); return const_op; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Dec 14 04:37:13 UTC 2022 - 5.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/fold_constants_to_subgraph.cc
llvm::cl::init(false)}; }; void CopyConstantIntoFunc(int argument_index, Operation* const_op, func::FuncOp func) { assert( (llvm::isa<TFL::ConstOp, TFL::QConstOp, arith::ConstantOp>(const_op)) && "Expect QConst or Const op."); OpBuilder builder(func.getBody()); auto cloned_const_op = const_op->clone(); cloned_const_op->setLoc(func.getBody().getLoc()); builder.insert(cloned_const_op);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/cc/const_op_size.cc
int64_t GetSizeOfIntOrFloatConst(TF::ConstOp const_op) { const Type dtype = const_op.getDtype(); const ElementsAttr const_value = const_op.getValue(); const auto bytes_per_elem = static_cast<int64_t>(dtype.getIntOrFloatBitWidth() / CHAR_BIT); return bytes_per_elem * const_value.getNumElements(); } int64_t GetSizeOfStringConst(TF::ConstOp const_op) { const ElementsAttr const_value = const_op.getValue();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Dec 14 04:37:13 UTC 2022 - 2.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_save_op.cc
auto const_op = dyn_cast<TF::ConstOp>(assigned_value_operand.getDefiningOp()); if (!const_op) continue; var_handle_ops.emplace_back(var_handle_op); } return var_handle_ops; } // Creates a `ConstOp` of 1-dimensional TF::StringType out of `str_values`. TF::ConstOp Create1DStringConst(const ArrayRef<std::string> str_values,
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/sink_constant.cc
// The sunk_constant map keeps a mapping from a ConstOp defined above to // a sunk clone of it. This allows for reusing a sunk constant with // multiple uses in the region. llvm::DenseMap<Value, TF::ConstOp> sunk_constant; Region &body = cluster.getBody(); visitUsedValuesDefinedAbove(body, [&](OpOperand *use) { Value constant = use->get(); auto const_op = dyn_cast_or_null<TF::ConstOp>(constant.getDefiningOp());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Nov 03 12:35:38 UTC 2022 - 4.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_restore_op.cc
var_handle_op && isa<TF::ConstOp>(assigned_value_operand.getDefiningOp())) { var_handle_ops.emplace_back(var_handle_op); } } return var_handle_ops; } // Creates a `ConstOp` of 1-dimensional TF::StringType out of `str_values`. TF::ConstOp Create1DStringConst(const ArrayRef<std::string> str_values, const Location loc, OpBuilder& builder) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sun Mar 12 06:02:20 UTC 2023 - 9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc
func.walk([&](Operation* op) { // TODO(renjieliu): Find a generic way to deal with const ops. if (op->hasTrait<OpTrait::IsTerminator>() || llvm::isa<TFL::QConstOp, TFL::ConstOp>(op) || llvm::isa<TFL::QConstOp, TFL::ConstOp, TF::ConstOp, ConstOp>(op)) return; bool int8_type_observed = false; bool uint8_type_observed = false;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/constant_op_device_assignment.cc
ConstantOpDeviceAssignmentPass> { void runOnOperation() override; }; void ConstantOpDeviceAssignmentPass::runOnOperation() { ModuleOp module = getOperation(); module.walk([&](TF::ConstOp op) { // Keep the ConstOp if the op already have the device attribute. if (StringAttr device_attr = op->getAttrOfType<StringAttr>(kDeviceAttr)) { return WalkResult::advance(); } OpBuilder builder(op);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Oct 05 23:50:19 UTC 2022 - 3.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/cc/constant_fold.cc
preceding_const_op = preceding_result.getDefiningOp<TF::ConstOp>(); inputs.push_back(preceding_const_op.getValue()); } SmallVector<Attribute> result_values; if (failed(TF::EvaluateOperation(op, inputs, result_values))) { return failure(); } results.clear(); builder.setInsertionPointAfter(op); for (const auto& result_value : result_values) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 5K bytes - Viewed (0)