Skip to content

Commit 9e56263

Browse files
generatedunixname499836121meta-codesync[bot]
authored andcommitted
Ensure typing.Union is correctly traced in Dynamo. (#169084)
Summary: Fixes `test_vector_norm_decom_unbacked_checks_cpu` from `test/test_linalg.py` on Python 3.14 X-link: pytorch/pytorch#169084 Approved by: https://github.com/rtimpe, https://github.com/williamwen42 Reviewed By: wdvr Differential Revision: D88036656 fbshipit-source-id: 34d374685fc18a03afd2bcd2509b4a5566b24940
1 parent ff4a8a3 commit 9e56263

File tree

1 file changed

+4
-0
lines changed
  • userbenchmark/dynamo/dynamobench/_dynamo

1 file changed

+4
-0
lines changed

userbenchmark/dynamo/dynamobench/_dynamo/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,10 @@ def istype(obj: object, allowed_types: Any) -> bool:
10651065
)
10661066

10671067

1068+
if sys.version_info >= (3, 14):
1069+
_builtin_final_typing_classes += (typing.Union,)
1070+
1071+
10681072
def is_typing(value: Any) -> bool:
10691073
# _Final catches most of typing classes:
10701074
# - Any

0 commit comments

Comments
 (0)