Skip to content

Commit bd6a766

Browse files
zou3519facebook-github-bot
authored andcommitted
Log non-pt2_compliant ops encountered by Dynamo
Summary: X-link: pytorch/pytorch#112581 See internal diff for more changes. Whenever we encounter a non-compliant op, we add it to a set on the OutputGraph. When a compilation event happens, we log the contents of this set. I'm planning on flipping the `only_allow_pt2_compliant_ops` config from False to True after the logging determines that existing models do not use non-compliant ops. Reviewed By: yanboliang Differential Revision: D50884828 fbshipit-source-id: 9866322c19b6b5cf702ac8b2afb2f450f0b9b438
1 parent fec2896 commit bd6a766

File tree

1 file changed

+2
-1
lines changed
  • userbenchmark/dynamo/dynamobench/_dynamo

1 file changed

+2
-1
lines changed

userbenchmark/dynamo/dynamobench/_dynamo/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from contextlib import contextmanager
2929
from functools import lru_cache, wraps
3030
from pathlib import Path
31-
from typing import Any, Dict, Optional, Tuple, Union
31+
from typing import Any, Dict, Optional, Set, Tuple, Union
3232

3333
try:
3434
import numpy as np
@@ -556,6 +556,7 @@ class CompilationMetrics:
556556
entire_frame_compile_time_s: Optional[float]
557557
backend_compile_time_s: Optional[float]
558558
fail_reason: Optional[str]
559+
non_compliant_ops: Set[str]
559560

560561

561562
@dataclasses.dataclass

0 commit comments

Comments
 (0)