/third_party/mindspore/mindspore/ccsrc/ps/ps_cache/ |
D | ps_cache_manager.cc | 25 void PsCacheManager::InsertHashTableSize(const std::string ¶m_name, size_t cache_vocab_size, si… in InsertHashTableSize() argument 27 if (cache_vocab_size == 0 || embedding_size == 0 || vocab_size == 0) { in InsertHashTableSize() 30 hash_tables_[param_name].cache_vocab_size = cache_vocab_size; in InsertHashTableSize() 31 hash_tables_[param_name].host_cache_vocab_size = cache_vocab_size * kHostCacheScaleFactor; in InsertHashTableSize() 39 vocab_cache_size_ = cache_vocab_size; in InsertHashTableSize() 42 host_vocab_cache_size_ = cache_vocab_size * kHostCacheScaleFactor; in InsertHashTableSize() 47 size_t cache_vocab_size, size_t embedding_size) { in ReInsertHashTableSize() argument 48 if (cache_vocab_size == 0 || embedding_size == 0) { in ReInsertHashTableSize() 62 hash_tables_[new_param_name].cache_vocab_size = cache_vocab_size; in ReInsertHashTableSize() 144 return iter->second.cache_vocab_size; in QueryHashTableSize() [all …]
|
D | ps_cache_basic.h | 37 virtual bool MallocConstantMemory(size_t cache_vocab_size) { return true; } in MallocConstantMemory() argument 44 … size_t cache_vocab_size, size_t embedding_size, size_t swap_out_size) = 0; 46 size_t cache_vocab_size, size_t embedding_size, size_t swap_in_size) = 0;
|
D | ps_cache_manager.h | 47 size_t cache_vocab_size{0}; 57 EmbeddingDeviceCache(size_t batch_elements, size_t cache_vocab_size) in EmbeddingDeviceCache() 63 device_hash_map_ = std::make_shared<EmbeddingHashMap>(0, cache_vocab_size); in EmbeddingDeviceCache() 118 …void InsertHashTableSize(const std::string ¶m_name, size_t cache_vocab_size, size_t embedding_… 123 size_t cache_vocab_size, size_t embedding_size);
|
/third_party/mindspore/mindspore/ccsrc/ps/ps_cache/ascend/ |
D | ascend_ps_cache.cc | 135 bool AscendPsCache::MallocConstantMemory(size_t cache_vocab_size) { in MallocConstantMemory() argument 142 int copy_value = SizeToInt(cache_vocab_size); in MallocConstantMemory() 213 … size_t cache_vocab_size, size_t embedding_size, size_t swap_out_size) { in HashSwapOut() argument 221 std::vector<size_t> hash_table_shape = {cache_vocab_size, embedding_size}; in HashSwapOut() 241 std::make_shared<Address>(hash_table_addr, cache_vocab_size * embedding_size * sizeof(float))); in HashSwapOut() 253 … size_t cache_vocab_size, size_t embedding_size, size_t swap_in_size) { in HashSwapIn() argument 261 std::vector<size_t> hash_table_shape = {cache_vocab_size, embedding_size}; in HashSwapIn() 281 std::make_shared<Address>(hash_table_addr, cache_vocab_size * embedding_size * sizeof(float))); in HashSwapIn()
|
D | ascend_ps_cache.h | 55 bool MallocConstantMemory(size_t cache_vocab_size) override; 61 …id *hash_table_addr, void *swap_out_value_addr, void *swap_out_index_addr, size_t cache_vocab_size, 63 …void *hash_table_addr, void *swap_in_value_addr, void *swap_in_index_addr, size_t cache_vocab_size,
|
/third_party/mindspore/mindspore/parallel/ |
D | _ps_context.py | 201 def _insert_hash_table_size(name, cache_vocab_size, embedding_size, vocab_size): argument 202 ps_context().insert_hash_table_size(name, cache_vocab_size, embedding_size, vocab_size) 205 def _reinsert_hash_table_size(new_name, cur_name, cache_vocab_size, embedding_size): argument 206 ps_context().reinsert_hash_table_size(new_name, cur_name, cache_vocab_size, embedding_size)
|
/third_party/mindspore/mindspore/ccsrc/ps/ps_cache/gpu/ |
D | gpu_ps_cache.h | 38 …id *hash_table_addr, void *swap_out_value_addr, void *swap_out_index_addr, size_t cache_vocab_size, 40 …void *hash_table_addr, void *swap_in_value_addr, void *swap_in_index_addr, size_t cache_vocab_size,
|
/third_party/mindspore/mindspore/ccsrc/ps/ |
D | ps_context.cc | 145 void PSContext::InsertHashTableSize(const std::string ¶m_name, size_t cache_vocab_size, size_t … in InsertHashTableSize() argument 148 ps_cache_instance.InsertHashTableSize(param_name, cache_vocab_size, embedding_size, vocab_size); in InsertHashTableSize() 153 size_t cache_vocab_size, size_t embedding_size) const { in ReInsertHashTableSize() argument 155 …ps_cache_instance.ReInsertHashTableSize(new_param_name, cur_param_name, cache_vocab_size, embeddin… in ReInsertHashTableSize()
|
D | ps_context.h | 74 …void InsertHashTableSize(const std::string ¶m_name, size_t cache_vocab_size, size_t embedding_… 77 size_t cache_vocab_size, size_t embedding_size) const;
|