mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix dynamo benchmark skip logic for cpu device (#135193)
Fixes #132380, adjust torchbench and huggingface skip models list, then we can remove `--no-skip` when running benchmarks on 3 suites. Pull Request resolved: https://github.com/pytorch/pytorch/pull/135193 Approved by: https://github.com/chuanqi129, https://github.com/jansel
This commit is contained in:
committed by
PyTorch MergeBot
parent
146921007a
commit
7ec17b49cf
@ -387,11 +387,6 @@ def get_skip_tests(suite, device, is_training: bool):
|
||||
skip_tests.update(module.TorchBenchmarkRunner().skip_models_for_cpu)
|
||||
elif device == "cuda":
|
||||
skip_tests.update(module.TorchBenchmarkRunner().skip_models_for_cuda)
|
||||
else:
|
||||
if hasattr(module, "SKIP"):
|
||||
skip_tests.update(module.SKIP)
|
||||
if is_training and hasattr(module, "SKIP_TRAIN"):
|
||||
skip_tests.update(module.SKIP_TRAIN)
|
||||
|
||||
skip_tests = (f"-x {name}" for name in skip_tests)
|
||||
skip_str = " ".join(skip_tests)
|
||||
@ -438,7 +433,7 @@ def generate_commands(args, dtypes, suites, devices, compilers, output_dir):
|
||||
if args.enable_cpu_launcher:
|
||||
launcher_cmd = f"python -m torch.backends.xeon.run_cpu {args.cpu_launcher_args}"
|
||||
cmd = f"{launcher_cmd} benchmarks/dynamo/{suite}.py --{testing} --{dtype} -d{device} --output={output_filename}"
|
||||
cmd = f"{cmd} {base_cmd} {args.extra_args} --no-skip --dashboard"
|
||||
cmd = f"{cmd} {base_cmd} {args.extra_args} --dashboard"
|
||||
skip_tests_str = get_skip_tests(suite, device, args.training)
|
||||
cmd = f"{cmd} {skip_tests_str}"
|
||||
|
||||
|
Reference in New Issue
Block a user