Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for session_init_funcs (0.15 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_freeze_variables.cc

            absl::StrCat("failed to fetch device manager: ", status.message()));
        return failure();
      }
    
      SmallVector<func::FuncOp, 2> session_init_funcs =
          tf_saved_model::GetInitializerFunctions(module);
      func::FuncOp session_init_func =
          session_init_funcs.empty() ? nullptr : session_init_funcs[0];
    
      TF::ResourceAnalyzer analyzer(module, /*skip_session_init=*/true);
      llvm::SmallVector<TF::VarHandleOp, 4> variables;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 09:56:53 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_restore_op.cc

    // the `tf.VarHandleOp`s that are initialized by these `tf.AssignVariableOp`s.
    std::vector<TF::VarHandleOp> CollectVariableOps(
        func::FuncOp session_init_func) {
      std::vector<TF::VarHandleOp> var_handle_ops{};
    
      for (auto assign_variable_op : llvm::make_early_inc_range(
               session_init_func.getOps<TF::AssignVariableOp>())) {
        Value resource_operand = assign_variable_op.getOperand(0);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Mar 12 06:02:20 UTC 2023
    - 9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/initialize_variables_in_session_init.cc

                            func::FuncOp session_init_func, OpBuilder builder) {
      absl::StatusOr<ElementsAttr> tensor_attr_or =
          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();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_save_op.cc

    // `tf.VarHandleOp`s that are initialized by these `tf.AssignVariableOp`s.
    SmallVector<TF::VarHandleOp> CollectVariableOps(
        func::FuncOp session_init_func) {
      SmallVector<TF::VarHandleOp> var_handle_ops{};
    
      for (auto assign_variable_op : llvm::make_early_inc_range(
               session_init_func.getOps<TF::AssignVariableOp>())) {
        Value resource_operand = assign_variable_op.getOperand(0);
        auto var_handle_op =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/unfreeze_constants.cc

        const_op.getResult().replaceAllUsesWith(read_variable_op);
      }
    
      return const_op_name_map;
    }
    
    // Inside `session_init_func`, creates AssignVariableOps(VarHandleOp, ConstOp)
    // for each VarHandleOp that replaces a ConstOp. The `session_init_func` will
    // essentially behave like restore_op for the newly created VarHandleOps whose
    // shared names are the values of `const_op_name_map`.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 16 15:04:53 UTC 2023
    - 14K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/analysis/resource_value_typed_analyzer.cc

    }
    
    }  // namespace
    
    ResourceAnalyzer::ResourceAnalyzer(ModuleOp module, bool skip_session_init) {
      auto session_init_func = GetSessionInitializerFunc(module);
      for (auto func : module.getOps<func::FuncOp>()) {
        if (skip_session_init && func == session_init_func) continue;
        (void)AnalyzeRegion(func.getRegion());
      }
    }
    
    void ResourceAnalyzer::SetPotentiallyWritten(Value resource) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 8K bytes
    - Viewed (0)
Back to top