Pull Request resolved: https://github.com/pytorch/pytorch/pull/76876

Approved by: https://github.com/ngimel
This commit is contained in:
anjali411 2022-05-05 04:50:17 +00:00 committed by PyTorch MergeBot
parent 6a44e0667b
commit ad8386c132
2 changed files with 2 additions and 2 deletions

View file

@ -831,7 +831,7 @@ class Generator(object):
# Defined in torch/csrc/utils/python_dispatch.cpp
def _dispatch_library(kind: str, name: str, dispatch: str, file: str, linenum: Any) -> Any: ...
def _dispatch_library(kind: str, name: str, dispatch: str, file: str = "", linenum: Any = 0) -> Any: ...
# Defined in torch/csrc/utils/init.cpp
class BenchmarkConfig(object):

View file

@ -66,7 +66,7 @@ class PythonDispatcher:
def __init__(self):
C._dispatch_check_invariants(self.name) # type: ignore[attr-defined]
self.ref = C._dispatch_library("FRAGMENT", self.namespace, "") # type: ignore[attr-defined]
self.ref = C._dispatch_library("FRAGMENT", self.namespace, "")
self.ref.def_("foo(Tensor x) -> Tensor")
"""