Skip to content

Commit

Permalink
Reduce strictness
Browse files Browse the repository at this point in the history
  • Loading branch information
manopapad committed Sep 19, 2023
1 parent ad97c8c commit f93277f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions cunumeric/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,23 @@ def wrapper(*args: Any, **kwargs: Any) -> Any:
# TODO: Handle functions that return results in other ways, e.g.
# np.add(out=) and np.put.
# TODO: parameterize on the classes to check equality on
# TODO: more disciplined way to filter non-deterministic functions
if (
res is not None
and isinstance(res, cunumeric.ndarray)
and not name.startswith("numpy.random")
and fallback
):
args = deep_apply(args, fallback)
kwargs = deep_apply(kwargs, fallback)
orig_res = orig_func(*args, **kwargs)
# TODO: parameterize on the function used to check equality
if allclose(fallback(res), orig_res):
print(f"OK: {name}")
try:
orig_res = orig_func(*args, **kwargs)
except Exception as e:
print(f"SKIP {name}: {e}")
else:
assert False
# TODO: parameterize on the function used to check equality
# TODO: skipping type checks for now
assert allclose(fallback(res), orig_res, check_dtype=False)
return res

# This is incredibly ugly and unpleasant, but @wraps(func) doesn't handle
Expand Down

0 comments on commit f93277f

Please sign in to comment.