未验证 提交 6af32a7f 编写于 作者: Y yaoxuefeng 提交者: GitHub

delete id 0 (#42951)

delete id 0 in gpups
上级 eb15e9a7
...@@ -106,6 +106,23 @@ __global__ void dy_mf_search_kernel(Table* table, ...@@ -106,6 +106,23 @@ __global__ void dy_mf_search_kernel(Table* table,
for (int j = 0; j < cur->mf_dim + 1; ++j) { for (int j = 0; j < cur->mf_dim + 1; ++j) {
cur->mf[j] = input.mf[j]; cur->mf[j] = input.mf[j];
} }
} else {
if (keys[i] != 0) {
printf("warning::pull miss key: %d", keys[i]);
}
FeatureValue* cur = (FeatureValue*)(vals + i * pull_feature_value_size);
cur->delta_score = 0;
cur->show = 0;
cur->clk = 0;
cur->slot = -1;
cur->lr = 0;
cur->lr_g2sum = 0;
cur->mf_size = 0;
cur->mf_dim = 8;
cur->cpu_ptr;
for (int j = 0; j < cur->mf_dim + 1; j++) {
cur->mf[j] = 0;
}
} }
} }
} }
...@@ -138,7 +155,9 @@ __global__ void dy_mf_update_kernel(Table* table, ...@@ -138,7 +155,9 @@ __global__ void dy_mf_update_kernel(Table* table,
FeaturePushValue* cur = (FeaturePushValue*)(grads + i * grad_value_size); FeaturePushValue* cur = (FeaturePushValue*)(grads + i * grad_value_size);
sgd.dy_mf_update_value(optimizer_config, (it.getter())->second, *cur); sgd.dy_mf_update_value(optimizer_config, (it.getter())->second, *cur);
} else { } else {
printf("warning: push miss key: %d", keys[i]); if (keys[i] != 0) {
printf("warning::push miss key: %d", keys[i]);
}
} }
} }
} }
......
...@@ -239,9 +239,6 @@ void PSGPUWrapper::PreBuildTask(std::shared_ptr<HeterContext> gpu_task) { ...@@ -239,9 +239,6 @@ void PSGPUWrapper::PreBuildTask(std::shared_ptr<HeterContext> gpu_task) {
VLOG(0) << "GpuPs task unique cost " << timeline.ElapsedSec() << " seconds."; VLOG(0) << "GpuPs task unique cost " << timeline.ElapsedSec() << " seconds.";
for (int i = 0; i < thread_keys_shard_num_; i++) { for (int i = 0; i < thread_keys_shard_num_; i++) {
for (int j = 0; j < multi_mf_dim_; j++) { for (int j = 0; j < multi_mf_dim_; j++) {
if (i == 0 && j == multi_mf_dim_ - 1) {
gpu_task->feature_dim_keys_[i][j].push_back(0);
}
VLOG(0) << "GpuPs shard: " << i << "mf dim: " << index_dim_vec_[j] VLOG(0) << "GpuPs shard: " << i << "mf dim: " << index_dim_vec_[j]
<< " key len: " << gpu_task->feature_dim_keys_[i][j].size(); << " key len: " << gpu_task->feature_dim_keys_[i][j].size();
gpu_task->value_dim_ptr_[i][j].resize( gpu_task->value_dim_ptr_[i][j].resize(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册