megengine.functional.debug_param.set_execution_strategy

set_execution_strategy(option)[源代码]

Sets the execution strategy of Conv2d and matmul

参数

option

Decides how matmul algorithms are chosen. Available value Strategy

  • HEURISTIC uses heuristic to choose the fastest algorithm.

  • PROFILE runs possible algorithms on real device to find the best one.

  • REPRODUCIBLE uses the algorithms that is reproducible.

  • OPTIMIZED uses the algorithms that is optimized.

The default strategy is HEURISTIC, this options can be combined to form a combination option, e.g. PROFILE | REPRODUCIBLE can combined a option that uses the fastest of profiling result that is also reproducible.

Available values string:

  • ‘HEURISTIC’ uses heuristic to choose the fastest algorithm.

  • ‘PROFILE’ runs possible algorithms on real device to find the best one.

  • ‘PROFILE_HEURISTIC’ uses profiling result and heuristic to choose the fastest algorithm.

  • ‘PROFILE_REPRODUCIBLE’ uses the fastest of profiling result that is also reproducible.

  • ‘HEURISTIC_REPRODUCIBLE’ uses heuristic to choose the fastest algorithm that is also reproducible.

The default strategy is ‘HEURISTIC’.

It can also be set through the environment variable ‘MEGENGINE_EXECUTION_STRATEGY’.