提交 97d5cd30 编写于 作者: D dongdaxiang

make pull dense worker work

上级 39014b9f
......@@ -66,11 +66,11 @@ class PullDenseWorker {
Scope* root_scope_;
bool running_;
std::map<uint64_t, uint64_t> last_versions_;
std::map<uint64_t, uint64_t> current_version_;
std::mutex mutex_for_version_;
std::map<uint64_t, std::vector<uint64_t>> training_versions_;
std::map<uint64_t, std::vector<std::string>> dense_value_names_;
static std::map<uint64_t, uint64_t> last_versions_;
static std::map<uint64_t, uint64_t> current_version_;
static std::mutex mutex_for_version_;
static std::map<uint64_t, std::vector<uint64_t>> training_versions_;
static std::map<uint64_t, std::vector<std::string>> dense_value_names_;
std::thread t_;
int thread_num_;
......
......@@ -213,12 +213,10 @@ void DownpourWorker::TrainFiles() {
push_sparse_status_.resize(0);
}
/*
for (size_t i = 0; i < param_.dense_table_size(); ++i) {
uint64_t tid = static_cast<uint64_t>(param_.dense_table(i).table_id());
pull_dense_worker_->IncreaseThreadVersion(thread_id_, tid);
}
*/
thread_scope_->DropKids();
++batch_cnt;
......
......@@ -18,6 +18,12 @@ namespace paddle {
namespace framework {
std::shared_ptr<PullDenseWorker> PullDenseWorker::s_instance_ = NULL;
std::mutex PullDenseWorker::mutex_for_version_;
std::map<uint64_t, uint64_t> PullDenseWorker::last_versions_;
std::map<uint64_t, uint64_t> PullDenseWorker::current_version_;
std::map<uint64_t, std::vector<uint64_t>> PullDenseWorker::training_versions_;
std::map<uint64_t, std::vector<std::string>>
PullDenseWorker::dense_value_names_;
void PullDenseWorker::Initialize(const TrainerDesc& param) {
running_ = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册