set_optimization¶
dragon.autograph.set_optimization(level=1)[source]¶Set the optimization for graph ir.
Following levels are defined (default=3):
- level =
0: Do nothing. - level =
1: Eliminate the unused outputs and operators. - level =
2: Apply the inplace to inputs if available. - level =
3: Allocate the shared buffer to outputs if available.
- Parameters:
- level (int, optional, default=3) – The optimization level.
- level =