mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[Dynamo] Fix the unimplemented_v2 of EventVariable.call_method in ctx_manager.py (#151208)
Changes: - Field of `explanations` shoule be `str` instead of `tuple` - Not only `torch.cuda.Event`, but alse `torch.xpu.Event` can trigger this message. Pull Request resolved: https://github.com/pytorch/pytorch/pull/151208 Approved by: https://github.com/Skylion007
This commit is contained in:
parent
9e20a8411b
commit
a2f7764507
|
|
@ -1341,13 +1341,14 @@ class EventVariable(VariableTracker):
|
|||
),
|
||||
)
|
||||
else:
|
||||
method_name = (
|
||||
f"{type(self.value).__module__}.{type(self.value).__qualname__}.{name}"
|
||||
)
|
||||
unimplemented_v2(
|
||||
gb_type="Unsupported torch.cuda.Event method",
|
||||
gb_type=f"Unsupported {method_name} method",
|
||||
context=str(name),
|
||||
explanation=(
|
||||
f"Dynamo doesn't support tracing the torch.cuda.Event.{name} method. "
|
||||
f"We currently support wait, record, synchronize, and query.",
|
||||
),
|
||||
explanation=f"Dynamo doesn't support tracing the {method_name} method. "
|
||||
f"We currently support wait, record, synchronize, and query.",
|
||||
hints=[
|
||||
*graph_break_hints.SUPPORTABLE,
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user