mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-29 03:04:55 +08:00
[functorch] Remove test/test_functorch_lagging_op_db.py (pytorch/functorch#845)
These tests are expected to fail, but we didn't communicate that very well and: 1. we have gotten multiple questions about them 2. we need to special case it in our CI 3. we don't even use the test anymore! So we are deleting it. Related: https://github.com/pytorch/functorch/issues/835
This commit is contained in:
@ -1,38 +0,0 @@
|
||||
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
from torch.testing._internal.common_methods_invocations import op_db
|
||||
from torch.testing._internal.common_device_type import (
|
||||
instantiate_device_type_tests,
|
||||
ops,
|
||||
)
|
||||
from torch.testing._internal.common_utils import TestCase, run_tests
|
||||
from functorch_lagging_op_db import (
|
||||
functorch_lagging_op_db,
|
||||
in_functorch_lagging_op_db,
|
||||
)
|
||||
import torch
|
||||
|
||||
|
||||
class TestFuncTorchLaggingOpDb(TestCase):
|
||||
def test_functorch_lagging_op_db_has_opinfos(self, device):
|
||||
self.assertEqual(len(functorch_lagging_op_db), len(op_db))
|
||||
|
||||
@ops(op_db, allowed_dtypes=(torch.float,))
|
||||
def test_coverage(self, device, dtype, op):
|
||||
if in_functorch_lagging_op_db(op):
|
||||
return
|
||||
raise RuntimeError(
|
||||
f"{(op.name, op.variant_test_name)} is in PyTorch's OpInfo db ",
|
||||
"but is not in functorch's OpInfo db. Please regenerate ",
|
||||
"test/functorch_lagging_op_db.py and add the new tests to ",
|
||||
"denylists if necessary.")
|
||||
|
||||
|
||||
instantiate_device_type_tests(
|
||||
TestFuncTorchLaggingOpDb, globals(), only_for=['cpu'])
|
||||
|
||||
if __name__ == '__main__':
|
||||
run_tests()
|
||||
Reference in New Issue
Block a user