Skip to content

Commit

Permalink
[skip-ci]
Browse files Browse the repository at this point in the history
Add not-implemented unary operators to test plan
  • Loading branch information
vobojevicTT committed Nov 7, 2024
1 parent 0530ed4 commit bd8eebf
Showing 1 changed file with 95 additions and 3 deletions.
98 changes: 95 additions & 3 deletions forge/test/operators/pytorch/eltwise_unary/test_unary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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,
Expand Down Expand Up @@ -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,
]

0 comments on commit bd8eebf

Please sign in to comment.