Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 39 for mutex_lock (0.22 sec)

  1. tensorflow/c/c_api_function.cc

    }
    
    int TF_GraphNumFunctions(TF_Graph* g) {
      tensorflow::mutex_lock l(g->mu);
      return g->graph.flib_def().num_functions();
    }
    
    int TF_GraphGetFunctions(TF_Graph* g, TF_Function** funcs, int max_func,
                             TF_Status* status) {
      tensorflow::FunctionDefLibrary lib;
      {
        tensorflow::mutex_lock l(g->mu);
        lib = g->graph.flib_def().ToProto();
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 15 03:35:10 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  2. tensorflow/c/kernels_experimental.cc

          std::unique_ptr<std::vector<tensorflow::mutex_lock>> locks,
          std::unique_ptr<std::vector<tensorflow::tf_shared_lock>> shared_locks)
          : vars(std::move(vars)),
            locks(std::move(locks)),
            shared_locks(std::move(shared_locks)) {}
    
      std::vector<tensorflow::Var*> vars;
      std::unique_ptr<std::vector<tensorflow::mutex_lock>> locks;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 23 06:12:29 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  3. tensorflow/c/eager/parallel_device/parallel_device_lib.cc

      std::unique_ptr<Thread> thread_;
    };
    
    DeviceThread::~DeviceThread() {
      {
        tensorflow::mutex_lock l(execution_mutex_);
        execution_state_ = ExecutionState::kShuttingDown;
      }
      start_execute_.notify_one();
    }
    
    void DeviceThread::AsyncWait(TF_Status* status) {
      tensorflow::mutex_lock l(execution_mutex_);
      TFE_ExecutorWaitForAllPendingNodes(executor_.get(), status);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 09 07:47:20 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/lift_variables.cc

    #include "tensorflow/core/public/session.h"
    
    namespace mlir {
    namespace tf_saved_model {
    
    using llvm::SmallSet;
    using ::tensorflow::Device;
    using ::tensorflow::DeviceMgr;
    using ::tensorflow::mutex_lock;
    using ::tensorflow::ResourceHandle;
    using ::tensorflow::Session;
    using ::tensorflow::Status;
    using ::tensorflow::StatusOr;
    using ::tensorflow::Tensor;
    using ::tensorflow::Var;
    
    namespace {
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  5. tensorflow/c/c_api_experimental.cc

      }
      TF_Buffer* ret = TF_NewBuffer();
      TF_CHECK_OK(MessageToBuffer(options, ret));
      return ret;
    }
    
    const char* TF_GraphDebugString(TF_Graph* graph, size_t* len) {
      tensorflow::mutex_lock c(graph->mu);
      const auto& debug_str = graph->graph.ToGraphDefDebug().DebugString();
      *len = debug_str.size();
      char* ret = static_cast<char*>(malloc(*len + 1));
      memcpy(ret, debug_str.c_str(), *len + 1);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 15 03:35:10 UTC 2024
    - 29.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/xla_device_ops.cc

                                    *(*ptr)->tensor() = value;
                                    (*ptr)->is_initialized = true;
                                    return absl::OkStatus();
                                  }));
      mutex_lock ml(*variable->mu());
      OP_REQUIRES(
          context,
          !variable->is_initialized || variable->tensor()->dtype() == dtype_,
          errors::InvalidArgument(
              "Trying to assign variable with wrong dtype. Expected ",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 3K bytes
    - Viewed (0)
  7. tensorflow/compiler/jit/variable_info.h

      }
    
      ~VariableInfo();
    
     private:
      int index_;
      std::string name_;
      Var* var_;
      std::optional<ManagedStackTrace> definition_stack_trace_;
    
      // We can't use a optional<mutex_lock> here because it confuses the compiler's
      // thread safety analysis. Instead we use a boolean flag and release the lock
      // in the VariableInfo destructor.
      bool lock_held_ = false;
      bool shared_lock_held_ = false;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Feb 14 21:57:02 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/device_compiler.h

        VLOG(2) << "Starting asynchronous compilation of cluster " << function_name
                << '.';
        // We don't need to lock mu, but do it anyway to satisfy thread safety
        // analysis.
        mutex mu;
        mutex_lock lock(mu);
        auto cache_value = typename DeviceCompilationCache<ExecutableType>::Value();
        auto s = CompileStrict(signature, compile_options, options, args, function,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/jit/kernels/xla_ops.cc

        mutex_lock l(mutex_);
        KeyT key = absl::StrCat(key_counter_++);
        bool insert_successful = closures_.emplace(key, std::move(result)).second;
        DCHECK(insert_successful);
        (void)insert_successful;
        return key;
      }
    
      ExecutableClosure<ExecutableType, ClientType> Consume(const KeyT& key) {
        mutex_lock l(mutex_);
        auto it = closures_.find(key);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 22:46:36 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  10. tensorflow/c/eager/c_api_unified_experimental_graph.cc

        TF_RETURN_IF_ERROR(tensorflow::TensorShapeUtils::MakeShape(dims, shape));
    
        return absl::OkStatus();
      }
    
      tensorflow::FullTypeDef FullType() const override {
        const FullTypeDef* ft;
        mutex_lock l(graph_->mu);
        graph_->graph.NodeType(output_.oper->node.name(), &ft);
        if (ft == nullptr) {
          return FullTypeDef();
        } else {
          return *ft;
        }
      }
    
      TF_Output output_;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 20:00:09 UTC 2024
    - 15.4K bytes
    - Viewed (0)
Back to top