- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 56 for var_handle_op (0.23 sec)
-
tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_save_op.cc
} // Returns cloned `VarHandleOp`s. Assumes `save_func`'s body is empty. SmallVector<TF::VarHandleOp> CloneVarHandleOpsIntoSaveFunc( func::FuncOp save_func, const ArrayRef<TF::VarHandleOp> var_handle_ops) { Block& save_op_block = save_func.getBody().front(); IRMapping mapper{}; SmallVector<TF::VarHandleOp> cloned_var_handle_ops = {}; for (auto var_handle_op : var_handle_ops) {
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/lite/transforms/quantize_variables.cc
} } // Update resource tensors. for (VarHandleOp var_handle_op : var_handle_ops) { builder.setInsertionPoint(var_handle_op); auto output_type = UnrankedTensorType::get(TF::ResourceType::get( {mlir::cast<TensorType>(ref_qtype)}, builder.getContext())); auto new_var_handle_op = builder.create<VarHandleOp>( var_handle_op.getLoc(), output_type, var_handle_op.getContainer(), var_handle_op.getSharedName());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/session_utils.cc
llvm::ArrayRef<TF::VarHandleOp> var_handle_ops) { std::vector<std::string> names; names.reserve(var_handle_ops.size()); for (auto var_handle_op : var_handle_ops) names.push_back(GetVariableName(var_handle_op)); return names; } tensorflow::Var* GetVariableFromSession(mlir::TF::VarHandleOp var_handle_op, llvm::StringRef device_name,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 3.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_freeze_variables.cc
variables; for (auto var_handle_op : var_handle_ops) variables.insert(GetResourceKey(var_handle_op)); llvm::SmallVector<Operation*, 4> work_list; for (auto var_handle_op : session_init_func.getOps<TF::VarHandleOp>()) { if (variables.count(GetResourceKey(var_handle_op))) work_list.push_back(var_handle_op); }
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/tensorflow/transforms/promote_resources_to_args.cc
auto resource_type = var_handle_op.getResource().getType(); func_arg_types.push_back(resource_type); var_handle_op.getResource().replaceAllUsesWith( block.addArgument(resource_type, var_handle_op.getLoc())); } else { var_handle_op.getResource().replaceAllUsesWith( block.getArgument(it.first->getSecond())); } var_handle_op.erase(); }
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/hoist_loop_invariant.cc
// hoisted. auto read_var_op = llvm::dyn_cast<ReadVariableOp>(op); if (!read_var_op) return false; auto var_handle_op = llvm::dyn_cast_or_null<VarHandleOp>( read_var_op.getResource().getDefiningOp()); if (!var_handle_op) return false; return read_only_vars.contains(GetResourceHandle(var_handle_op)); } bool ShouldMoveOutOfRegion( Operation *op, Region *region,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/initialize_variables_in_session_init.cc
return failure(); } // Fetch all VarHandleOp. llvm::StringSet<> variable_names; llvm::SmallVector<TF::VarHandleOp, 4> var_ops; for (auto func_op : module.getOps<func::FuncOp>()) { for (auto var_handle_op : func_op.getOps<TF::VarHandleOp>()) { auto variable_name = GetVariableName(var_handle_op); if (variable_names.count(variable_name)) continue;
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/quantization/tensorflow/cc/save_variables.cc
auto resource_operand = assign_var_op.getOperand(0); auto var_handle_op = llvm::dyn_cast<mlir::TF::VarHandleOp>(resource_operand.getDefiningOp()); if (!var_handle_op) { assign_var_op->emitRemark( "Operand idx 0 is not a tf.VarHandleOp. The initializing tensor is not " "saved to checkpoint."); return ""; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Feb 26 03:36:55 UTC 2024 - 4.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting_cleanup.cc
} using LocalVarOp = std::variant<TF::VarHandleOp, TF::MlirLocalVarOp>; Value LocalVarOp_resource(LocalVarOp &op) { if (auto var_handle_op = std::get_if<TF::VarHandleOp>(&op)) { return var_handle_op->getResource(); } else { return std::get<TF::MlirLocalVarOp>(op).getResource(); } } void LocalVarOp_erase(LocalVarOp &op) { if (auto var_handle_op = std::get_if<TF::VarHandleOp>(&op)) { var_handle_op->erase();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 19.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/lower_variable_ops_to_ml_program.cc
} } return nullptr; } Type GetGlobalType(Operation* source) { if (auto var_handle_op = dyn_cast<TF::VarHandleOp>(source)) { // Resources are represented as tensor<resource<tensor<...>>>, so // unwrap until we get to the inner tensor<...>. auto tensor = llvm::dyn_cast<TensorType>(var_handle_op.getResource().getType()); if (!tensor) return nullptr; TF::ResourceType resource =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Mar 06 23:53:00 UTC 2024 - 7.6K bytes - Viewed (0)