megengine.config

async_level

Get or set config whether raise error exactly when invoking op. The default level is 2, which means both device and user side errors are async.

实际案例

import megengine as mge
mge.config.async_level = 2
返回类型

int

benchmark_kernel

Whether or not run possible algorithms on real device to find the best one. The default option is false, which means use heuristic to choose the fastest algorithm.

实际案例

import megengine as mge
mge.config.benchmark_kernel = True
deterministic_kernel

Whether or not the fastest algorithm choosed is reproducible. The default option is false, which means the algorithm is not reproducible.

实际案例

import megengine as mge
mge.config.deterministic_kernel = True
disable_memory_forwarding

Get or set config whether to disable memory forwarding. The default option is false, which means storage may be shared among tensors.

实际案例

import megengine as mge
mge.config.disable_memory_forwarding = False
返回类型

bool