set_execution

dragon.autograph.set_execution(execution='GRAPH_MODE')[source]

Set the execution mode for graph ir.

For changing the execution temporarily, use:

# Enter a context to enforce graph execution
with dragon.graph_mode():
    pass

# Enter a context to enforce eager execution
with dragon.eager_mode():
    pass
Parameters:
  • execution ({'GRAPH_MODE', 'EAGER_MODE'}, optional) – The execution mode.