Revert "Update impl_abstract_pystub to be less boilerplatey (#112851)"

This reverts commit 6ae4e3a8d249a96d9a8bbfba389d0509783e11e1.

Reverted https://github.com/pytorch/pytorch/pull/112851 on behalf of https://github.com/facebook-github-bot due to Diff reverted internally ([comment](https://github.com/pytorch/pytorch/pull/112851#issuecomment-1799539354))
This commit is contained in:
PyTorch MergeBot
2023-11-07 18:53:13 +00:00
parent 2fc940e0c4
commit bc3e2e03cd
15 changed files with 29 additions and 166 deletions

View File

@ -1,9 +1,10 @@
import torch
import torch._custom_ops as library
from model import get_custom_op_library_path
torch.ops.load_library(get_custom_op_library_path())
@torch.library.impl_abstract("custom::sin")
@library.impl_abstract("custom::sin")
def sin_abstract(x):
return torch.empty_like(x)