Skip to content

Commit

Permalink
Possible fix for einops warning (pytorch#124084)
Browse files Browse the repository at this point in the history
  • Loading branch information
jansel authored and petrex committed May 3, 2024
1 parent e6160bd commit cc82a47
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions torch/_dynamo/trace_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -3036,10 +3036,6 @@ def add_module_init_func(name: str, init_func: Callable[[], None]) -> None:
"""Register a module without eagerly importing it"""
# If the module is already imported, eagerly run init
assert "." not in name, f"Expected a root module name, but got {name}"
if name in sys.modules:
init_func()

# Module is not yet imported, delay processing until needed
assert name not in _lazy_module_init
_lazy_module_init[name].append(init_func)

Expand Down

0 comments on commit cc82a47

Please sign in to comment.