Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhao9 committed Mar 22, 2024
1 parent e51bca6 commit 98e3b1f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions userbenchmark/test_bench/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def run_config(
return dict.fromkeys(metrics, str(e))


def run_config_cuda_leak(config: TorchBenchModelConfig):
def run_config_memleak(config: TorchBenchModelConfig):
def assertEqual(x, y):
assert x == y, f"{x} != {y}"
model_name = config.name
Expand All @@ -222,11 +222,11 @@ def assertEqual(x, y):
task.check_details_eval(device=config.device, md=metadata)
task.check_eval_output()
task.del_model_instance()
result = {"cuda_memory_leak": "False"}
result = {"memleak": "False"}
except NotImplementedError as e:
result = {"cuda_memory_leak": "not_impleted"}
result = {"memleak": "not_implemented"}
except AssertionError:
result = {"cuda_memory_leak": "True"}
result = {"memleak": "True"}
finally:
return result

Expand Down Expand Up @@ -322,7 +322,7 @@ def run(args: List[str]):
if "accuracy" in metrics:
metrics_dict = run_config_accuracy(config, metrics, dryrun=args.dryrun)
elif "memleak" in metrics:
metrics_dict = run_config_accuracy(config)
metrics_dict = run_config_memleak(config)
else:
metrics_dict = run_config(config, metrics, dryrun=args.dryrun)
config_str = config_to_str(config)
Expand Down

0 comments on commit 98e3b1f

Please sign in to comment.