Skip to content

Commit

Permalink
Further cleanup torch.py (#114669)
Browse files Browse the repository at this point in the history
Summary:
A follow-up PR to clean up what I found during the refactor of torch.py

X-link: pytorch/pytorch#114669
Approved by: https://github.com/jansel

Reviewed By: atalman

Differential Revision: D51778474

Pulled By: yanboliang

fbshipit-source-id: 42c955ff5a0a18359c90552acc34589475036b1c
  • Loading branch information
yanboliang authored and facebook-github-bot committed Dec 4, 2023
1 parent 0deb0be commit 8f7ee82
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions userbenchmark/dynamo/dynamobench/_dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2265,20 +2265,6 @@ def get_static_address_type(t):
return None


def is_rng_state_getter_or_setter(value):
getters = (
torch.default_generator.get_state,
torch.get_rng_state,
torch.cuda.get_rng_state,
)
setters = (
torch.default_generator.set_state,
torch.set_rng_state,
torch.cuda.set_rng_state,
)
return value in (*setters, *getters)


def is_tensor_base_attr_getter(value):
return (
isinstance(value, types.MethodWrapperType)
Expand Down

0 comments on commit 8f7ee82

Please sign in to comment.