Add forward AD support for as_strided (#68629)

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/68629

Test Plan: Imported from OSS

Reviewed By: albanD

Differential Revision: D32899680

Pulled By: soulitzer

fbshipit-source-id: b80ba4483c06108938923f17dc67278b854515ef
This commit is contained in:
soulitzer
2021-12-14 04:31:11 -08:00
committed by Facebook GitHub Bot
parent fed9b90ed4
commit 6078e12ad6

View File

@ -681,7 +681,7 @@ class TestViewOps(TestCase):
x = prepro_fn(x)
return x.as_strided(size, strides, offset)
gradcheck(closure, [x])
gradcheck(closure, [x], check_forward_ad=True)
gradgradcheck(closure, [x])
# test