From bd8eebfc5a2a7e41daf444728697bf5d8730f519 Mon Sep 17 00:00:00 2001 From: Vladica Obojevic Date: Thu, 7 Nov 2024 14:34:59 +0000 Subject: [PATCH] [skip-ci] Add not-implemented unary operators to test plan --- .../pytorch/eltwise_unary/test_unary.py | 98 ++++++++++++++++++- 1 file changed, 95 insertions(+), 3 deletions(-) diff --git a/forge/test/operators/pytorch/eltwise_unary/test_unary.py b/forge/test/operators/pytorch/eltwise_unary/test_unary.py index 10d946f4..4f2f1db4 100644 --- a/forge/test/operators/pytorch/eltwise_unary/test_unary.py +++ b/forge/test/operators/pytorch/eltwise_unary/test_unary.py @@ -157,7 +157,8 @@ class TestParamsData: __test__ = False - test_plan: TestPlan = None + test_plan_implemented: TestPlan = None + test_plan_not_implemented: TestPlan = None class TestCollectionData: @@ -167,9 +168,75 @@ class TestCollectionData: implemented = TestCollection( operators=["relu", "sqrt", "reciprocal", "sigmoid"], ) + not_implemented = TestCollection( + operators=[ + "abs", + "absolute", + "acos", + "arccos", + "acosh", + "arccosh", + "angle", + "asin", + "arcsin", + "asinh", + "arcsinh", + "atan", + "arctan", + "atanh", + "arctanh", + "bitwise_not", + "ceil", + "clamp", + "clip", + "conj_physical", + "cos", + "cosh", + "deg2rad", + "digamma", + "erf", + "erfc", + "erfinv", + "exp", + "exp2", + "expm1", + "fix", + "floor", + "frac", + "lgamma", + "log", + "log10", + "log1p", + "log2", + "logit", + "i0", + "isnan", + "nan_to_num", + "neg", + "negative", + "positive", + "pow", + "rad2deg", + "reciprocal", + "round", + "rsqrt", + "sigmoid", + "sign", + "sgn", + "signbit", + "sin", + "sinc", + "sinh", + "sqrt", + "square", + "tan", + "tanh", + "trunc", + ], + ) -TestParamsData.test_plan = TestPlan( +TestParamsData.test_plan_implemented = TestPlan( verify=lambda test_device, test_vector: TestVerification.verify( test_device, test_vector, @@ -238,7 +305,32 @@ class TestCollectionData: ) +TestParamsData.test_plan_not_implemented = TestPlan( + verify=lambda test_device, test_vector: TestVerification.verify( + test_device, + test_vector, + ), + collections=[ + TestCollection( + operators=TestCollectionData.not_implemented.operators, + input_sources=TestCollectionCommon.single.input_sources, + input_shapes=TestCollectionCommon.single.input_shapes, + ) + ], + failing_rules=[ + TestCollection( + operators=TestCollectionData.not_implemented.operators, + input_sources=TestCollectionCommon.single.input_sources, + input_shapes=TestCollectionCommon.single.input_shapes, + failing_reason=FailingReasons.NOT_IMPLEMENTED, + ), + ], +) + + + def get_test_plans() -> List[TestPlan]: return [ - TestParamsData.test_plan, + TestParamsData.test_plan_implemented, + TestParamsData.test_plan_not_implemented, ]