-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Closed
Labels
module: dynamomodule: python versionIssues related to specific Python versionsIssues related to specific Python versionsoncall: pt2triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
The following code results in a graph break:
import sys
import torch
def callback(*args, **kwargs):
torch._dynamo.graph_break()
sys.monitoring.use_tool_id(0, "test")
sys.monitoring.register_callback(0, sys.monitoring.events.PY_START, callback)
sys.monitoring.set_events(0, sys.monitoring.events.PY_START)
@torch.compile(backend="eager", fullgraph=True)
def fn(x):
return x + 1
fn(torch.ones(3))
Internal context: fdb
is not compatible with torch.compile
on Python 3.12+. pdb
may be switching to sys.monitoring
for Python 3.14, so we need Dynamo to be able to interact with sys.monitoring
more gracefully fairly soon.
cc @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames
anijain2305
Metadata
Metadata
Assignees
Labels
module: dynamomodule: python versionIssues related to specific Python versionsIssues related to specific Python versionsoncall: pt2triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module