-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Embedding] Fix coredump when destruct FAE object and enable auto selection of ValuePtr. #114
Conversation
@@ -281,7 +281,7 @@ class EmbeddingVar : public ResourceBase { | |||
EmbeddingFilter<K, V, EmbeddingVar<K, V>>* filter_; | |||
|
|||
~EmbeddingVar() override { | |||
if (emb_config_.is_primary()) { | |||
if (emb_config_.is_primary() && emb_config_.primary_emb_index == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加个comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
switch (sc_.type) { | ||
case StorageType::DRAM: | ||
VLOG(1) << "StorageManager::DRAM: " << name_; | ||
kvs_.push_back(std::make_pair(new LocklessHashMap<K, V>(), ev_allocator())); | ||
kvs_.push_back(std::make_pair(new LocklessHashMap<K, V>(), cpu_allocator())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改回 ev allocator ,有问题的ev_allocator 已经revert了
StorageConfig(StorageType t, | ||
const std::string& p, | ||
int64 s) : type(t), path(p), size(s) {} | ||
int64 s, | ||
const std::string layout) : type(t), path(p), size(s) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在这个类是Embedding整体的配置
以后是要对每一级的layout 配置,存在多级存储下面有不同的layout的情况
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个在HBM多级的时候会加上修改
case LayoutType::NORMAL_FIX: | ||
new_value_ptr_fn_ = [] (Allocator* alloc, size_t size) { return new NormalContiguousValuePtr<V>(alloc, size); }; | ||
break; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加 default label
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
bool IsMultiLevel() { | ||
return is_multi_level_; | ||
} | ||
|
||
void DebugString() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加了新的配置,修改DebugString 方法
改成TF的标准样式,
std::string DebugString() const {
return strings::StrCat(....................)
if (max_element_size != 0 && false_positive_probability != -1.0){ | ||
kHashFunc = calc_num_hash_func(false_positive_probability); | ||
num_counter = calc_num_counter(max_element_size, false_positive_probability); | ||
} else { | ||
kHashFunc = 0; | ||
num_counter = 0; | ||
} | ||
if (layout_type == LayoutType::NORMAL_FIX) { | ||
if (layout == "normal_fix") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个名字,再refine一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
48c7a22
to
879c92f
Compare
self._layout = "normal" | ||
self._layout = "normal_fix" | ||
self._layout = "light" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里需要梳理一下各个功能与layout的选择
rerun test @bot |
879c92f
to
20203bd
Compare
20203bd
to
516dee8
Compare
…ection of ValuePtr.
516dee8
to
072f2db
Compare
No description provided.