oneflow.config

oneflow.config.collect_act_event(val: bool = True) → None

Whether or not collect active event.

Parameters

val (bool, optional) – True or False. Defaults to True.

oneflow.config.comm_net_worker_num(val: int) → None
Set up the workers number in epoll mode network,

If use RDMA mode network, then doesn’t need.

Parameters

val (int) – number of workers

oneflow.config.compute_thread_pool_size(val: int) → None

Set up the size of compute thread pool

Parameters

val (int) – size of thread pool

oneflow.config.cpu_device_num(val: int) → None

Set number of CPUs on each machine to run oneflow on. Usually you don’t need to set this.

Parameters

val (int) – number of CPUs. It is identical on every machine.

oneflow.config.disable_group_boxing_by_dst_parallel(val: bool = False) → None

Whether or not disable group boxing by dst parallel pass to reduce boxing memory life cycle.

Parameters

val (bool, optional) – True or False. Defaults to False.

oneflow.config.enable_debug_mode(val: bool) → None

Whether use debug mode or not.

Parameters

val (bool) – True or False

oneflow.config.enable_legacy_model_io(val: bool = True)

Whether or not use legacy model io.

Parameters

val ([type]) – True or False

oneflow.config.enable_mem_chain_merge(val: bool = True) → None

Whether or not to enable MemChain merge.

Parameters

val (bool, optional) – True or False. Defaults to True.

oneflow.config.enable_model_io_v2(val)

Whether or not use version2 of model input/output function.

Parameters

val ([type]) – True or False

oneflow.config.enable_numa_aware_cuda_malloc_host(val: bool = True) → None

Whether or not let numa know that cuda allocated host’s memory.

Parameters

val (bool, optional) – True or False. Defaults to True.

oneflow.config.enable_tensor_float_32_compute(val: bool = True) → None

Whether or not to enable Tensor-float-32 on supported GPUs

Parameters

val (bool, optional) – True or False. Defaults to True.

oneflow.config.gpu_device_num(val: int) → None

Set number of GPUs on each machine to run oneflow on.

Parameters
  • val (int) – number of GPUs. It is identical on every machine. In other words,

  • can't specify different number of GPUs you would like to use on each machine. (you) –

oneflow.config.legacy_model_io_enabled()
oneflow.config.load_library(val: str) → None

Load necessary library for job

Parameters

val (str) – path to shared object file

oneflow.config.load_library_now(val: str) → None

Load necessary library for job now

Parameters

val (str) – path to shared object file

oneflow.config.machine_num(val: int) → None

Set available number of machine/node for running job .

Parameters

val (int) – available number of machines

oneflow.config.max_mdsave_worker_num(val: int) → None

Set up max number of workers for mdsave process.

Parameters

val (int) – max number of workers

oneflow.config.nccl_use_compute_stream(val: bool = False) → None

Whether or not nccl use compute stream to reuse nccl memory and speedup

Parameters

val (bool, optional) – True or False. Defaults to False.

oneflow.config.persistence_buf_byte(val: int) → None

Set up buffer size for persistence.

Parameters

val (int) – e.g. 1024(bytes)

oneflow.config.rdma_mem_block_mbyte(val: int) → None

Set up the memory block size in rdma mode.

Parameters

val (int) – size of block, e.g. 1024(mb)

oneflow.config.rdma_recv_msg_buf_mbyte(val: int) → None

Set up the buffer size for receiving messages in rama mode

Parameters

val (int) – buffer size, e.g. 1024(mb)

oneflow.config.reserved_device_mem_mbyte(val: int) → None

Set up the memory size of reserved device

Parameters

val (int) – memory size, e.g. 1024(mb)

oneflow.config.reserved_host_mem_mbyte(val: int) → None

Set up the memory size of reserved host

Parameters

val (int) – memory size, e.g. 1024(mb)

oneflow.config.save_downloaded_file_to_local_fs(val: bool = True) → None

Whether or not save downloaded file to local file system.

Parameters

val (bool, optional) – True or False. Defaults to True.

oneflow.config.thread_enable_local_message_queue(val: bool) → None

Whether or not enable thread using local message queue.

Parameters

val (bool) – True or False

oneflow.config.use_rdma(val: bool = True) → None
Whether use RDMA to speed up data transmission in cluster nodes or not.

if not, then use normal epoll mode.

Parameters

val (bool, optional) – Defaults to True.