|
|
|
@@ -222,8 +222,9 @@ void PsCacheManager::AllocMemForHashTable() { |
|
|
|
device_address.addr = addr; |
|
|
|
|
|
|
|
auto &host_address = item.second.host_address; |
|
|
|
host_address = |
|
|
|
std::shared_ptr<float[]>(new float[host_vocab_cache_size_ * embedding_size], std::default_delete<float[]>()); |
|
|
|
std::unique_ptr<float[]> host_hash_table_addr = std::make_unique<float[]>(host_vocab_cache_size_ * embedding_size); |
|
|
|
MS_EXCEPTION_IF_NULL(host_hash_table_addr); |
|
|
|
host_address = std::move(host_hash_table_addr); |
|
|
|
MS_EXCEPTION_IF_NULL(host_address); |
|
|
|
|
|
|
|
max_embedding_size = (embedding_size > max_embedding_size) ? embedding_size : max_embedding_size; |
|
|
|
|