mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user