Skip to content

Commit

Permalink
Bypass non-implemented backward test
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhao9 committed Nov 18, 2024
1 parent 19d6db9 commit 53a1115
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions test/test_gpu/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,15 @@ def _run_operator_in_task(op: str, args: List[str]):
task.check_output()
task.del_op_instance()
# Test backward (if applicable)
args.extend(["--bwd"])
task.make_operator_instance(args=args)
task.run()
task.check_output()
try:
args.extend(["--bwd"])
task.make_operator_instance(args=args)
task.run()
task.check_output()
except NotImplementedError:
logger.info(
f"Operator {op.name} does not support backward, skipping backward test."
)


def make_test(operator):
Expand Down

0 comments on commit 53a1115

Please sign in to comment.