forked from mindspore-Ecosystem/mindspore
!15318 Fix CodeDex warnings
From: @zyli2020 Reviewed-by: @cristoval,@limingqi107 Signed-off-by: @limingqi107
This commit is contained in:
commit
3e7b23547e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue