oneflow.one_embedding.make_device_mem_store_options

oneflow.one_embedding.make_device_mem_store_options(persistent_path, capacity, size_factor=1, storage_dim=- 1, physical_block_size=4096)

make GPU only store_options param of MultiTableEmbedding

Parameters
  • persistent_path (str, list) – persistent storage path of Embedding. If passed a str, current rank Embedding will be saved in path/rank_id-num_ranks path. If passed a list, the list length must equals num_ranks, each elem of list represent the path of rank_id Embedding.

  • capacity (int) – total capacity of Embedding

  • size_factor (int, optional) – store size factor of embedding_dim, if SGD update, and momentum = 0, should be 1, if momentum > 0, it should be 2. if Adam, should be 3. Defaults to 1.

  • storage_dim (int, optional) – number of elements in embedding storage, if set storage_dim, the size_factor param will be invalid. if SGD update, and momentum = 0, storage_dim should be embedding_size*1, if momentum > 0, storage_dim should be embedding_size*2. if Adam, storage_dim should be embedding_size*3. Defaults to -1.

  • physical_block_size (int, optional) – physical_block_size should be sector size. Defaults to 4096.

Returns

GPU only store_options param of MultiTableEmbedding

Return type

dict

See also oneflow.one_embedding.make_cached_ssd_store_options()