mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Revert "[hop] ban creating hop by directly instantiating HigherOrderOperator. (#133645)"
This reverts commit 696107efcb83f9359aa669ab343c2cfa2a111372. Reverted https://github.com/pytorch/pytorch/pull/133645 on behalf of https://github.com/ydwu4 due to breaking ci. probably due to land race ([comment](https://github.com/pytorch/pytorch/pull/133645#issuecomment-2302866106))
This commit is contained in:
@ -4989,11 +4989,7 @@ def forward(self, x_1):
|
||||
|
||||
|
||||
def construct_sum_pyop():
|
||||
class MySum(HigherOrderOperator):
|
||||
def __init__(self):
|
||||
super().__init__("mysum")
|
||||
|
||||
mysum = MySum()
|
||||
mysum = HigherOrderOperator("mysum")
|
||||
|
||||
@mysum.py_impl(torch._C._functorch.TransformType.Vmap)
|
||||
def mysum_batch_rule(interpreter, x, dim):
|
||||
|
Reference in New Issue
Block a user