Skip to content

Commit 68cf9df

Browse files
generatedunixname499836121facebook-github-bot
authored andcommitted
Revert "Record the pre-graph bytecode using fast record function event (#154974)"
Summary: This reverts commit bee9c70c5d4b681ec1f2adf92eca1205b372634a. Reverted pytorch/pytorch#154974 on behalf of https://github.com/malfet due to Broke inductor tests, see https://hud.pytorch.org/hud/pytorch/pytorch/3c72b9fd8feed4588a040bc681ffe83cc7acd26d/1?per_page=50&name_filter=inductor%20%2F%20unit&mergeEphemeralLF=true ([comment](pytorch/pytorch#154974 (comment))) Reviewed By: seemethere Differential Revision: D76048603 fbshipit-source-id: 6e254f3cd7b65befc2270bfecaee98c5b74f02c5
1 parent 6bb9853 commit 68cf9df

File tree

1 file changed

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

1 file changed

+1
-15
lines changed

userbenchmark/dynamo/dynamobench/_dynamo/utils.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
import warnings
4848
import weakref
4949
from collections import Counter, OrderedDict
50-
from contextlib import AbstractContextManager, contextmanager
50+
from contextlib import contextmanager
5151
from dataclasses import is_dataclass
5252
from functools import lru_cache
5353
from types import MethodWrapperType
@@ -4674,17 +4674,3 @@ def maybe_disable_inference_mode_for_fake_prop() -> Generator[None, None, None]:
46744674

46754675
def is_node_meta_valid(node: Optional[torch.fx.Node]) -> bool:
46764676
return node is None or "example_value" in node.meta or "val" in node.meta
4677-
4678-
4679-
def record_pregraph_bytecode_enter() -> AbstractContextManager[None]:
4680-
cm: AbstractContextManager[None] = (
4681-
torch._C._profiler._RecordFunctionFast("Pregraph bytecode")
4682-
if torch.autograd.profiler._is_profiler_enabled
4683-
else contextlib.nullcontext()
4684-
)
4685-
cm.__enter__()
4686-
return cm
4687-
4688-
4689-
def record_pregraph_bytecode_exit(cm: AbstractContextManager[None]) -> None:
4690-
cm.__exit__(None, None, None)

0 commit comments

Comments
 (0)