megengine.set_prealloc_config

set_prealloc_config(alignment=1, min_req=32 * 1024 * 1024, max_overhead=0, growth_factor=2.0, device_type=DeviceType.CUDA)[source]

Specifies how to pre-allocate from raw device allocator.

Parameters
  • alignment (int) – specifies the alignment in bytes.

  • min_req (int) – min request size in bytes.

  • max_overhead (int) – max overhead above required size in bytes.

  • growth_factor – request size / cur allocated`

  • device_type – the device type

  • alignment – int:

  • min_req – int:

  • max_overhead – int: