-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Description
🐛 Describe the bug
Vision_maskrcnn of torchbench has incorrect result when using inductor.
RuntimeError: The size of tensor a (36) must match the size of tensor b (34) at non-singleton dimension 0
Reproduce command:
python benchmarks/dynamo/torchbench.py --accuracy --float32 -dcpu --inductor-settings --float32 -n50 --inductor --no-skip --quiet -k "vision_maskrcnn"
Error logs
cpu eval vision_maskrcnn
Traceback (most recent call last):
File "benchmarks/dynamo/torchbench.py", line 349, in
main(TorchBenchmarkRunner(), original_dir)
File "/home/bzheng/workspace/pytorch/benchmarks/dynamo/common.py", line 1532, in main
return maybe_fresh_cache(run, args.cold_start_latency and args.only)(
File "/home/bzheng/workspace/pytorch/benchmarks/dynamo/common.py", line 772, in inner
return fn(*args, **kwargs)
File "/home/bzheng/workspace/pytorch/benchmarks/dynamo/common.py", line 1845, in run
runner.run_one_model(
File "/home/bzheng/workspace/pytorch/benchmarks/dynamo/common.py", line 1267, in run_one_model
status = self.check_accuracy(
File "/home/bzheng/workspace/pytorch/benchmarks/dynamo/common.py", line 1104, in check_accuracy
if not same(
File "/home/bzheng/workspace/pytorch/torch/_dynamo/utils.py", line 774, in same
return len(ref) == len(res) and all(
File "/home/bzheng/workspace/pytorch/torch/_dynamo/utils.py", line 775, in
same(ai, bi, fp64_refi, cos_similarity, tol, equal_nan, exact_dtype)
File "/home/bzheng/workspace/pytorch/torch/_dynamo/utils.py", line 785, in same
same(
File "/home/bzheng/workspace/pytorch/torch/_dynamo/utils.py", line 831, in same
if torch.allclose(ref, res, atol=tol, rtol=tol, equal_nan=equal_nan):
RuntimeError: The size of tensor a (36) must match the size of tensor b (34) at non-singleton dimension 0
ERROR
cpu gmean=nanx mean=nanx
vision_maskrcnn gmean=nanx mean=nanx
0 gmean=nanx mean=nanx
0.0000 gmean=nanx mean=nanx
Minified repro
python benchmarks/dynamo/torchbench.py --accuracy --float32 -dcpu --inductor-settings --float32 -n50 --inductor --no-skip --quiet -k "vision_maskrcnn"
Metadata
Metadata
Assignees
Labels
Type
Projects
Status