Rate this Page

torch.fx.experimental.debug.set_trace#

torch.fx.experimental.debug.set_trace(gm)[source]#

Sets a breakpoint in gm’s generated python code. It drops into pdb when gm gets run.

Parameters:

gm (GraphModule) – graph module to insert breakpoint. It is then recompiled for it to take effect.

Returns:

the gm with breakpoint inserted.

Return type:

GraphModule