pytorch - 💡(How to fix) Fix [Test] `functorch/test_vmap.py` RuntimeError during test setup with CPU and CUDA [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Traceback (most recent call last): File "/tmp/agents-local/workspace/pytorch/test/functorch/test_vmap.py", line 6575, in <module> instantiate_device_type_tests(TestVmapOperatorsOpInfo, globals(), only_for=only_for) File "/tmp/agents-local/workspace/pytorch/torch/testing/_internal/common_device_type.py", line 1065, in instantiate_device_type_tests device_type_test_class.instantiate_test( File "/tmp/agents-local/workspace/pytorch/torch/testing/_internal/common_device_type.py", line 625, in instantiate_test instantiate_test_helper( File "/tmp/agents-local/workspace/pytorch/torch/testing/_internal/common_device_type.py", line 531, in instantiate_test_helper test = decorator(test) ^^^^^^^^^^^^^^^ File "/tmp/agents-local/workspace/pytorch/torch/testing/_internal/opinfo/core.py", line 1713, in call raise RuntimeError("Multiple sets of sample_skips_and_xfails defined") RuntimeError: Multiple sets of sample_skips_and_xfails defined

Fix Action

Fixed

Code Example

Traceback (most recent call last):
  File "/tmp/agents-local/workspace/pytorch/test/functorch/test_vmap.py", line 6575, in <module>
    instantiate_device_type_tests(TestVmapOperatorsOpInfo, globals(), only_for=only_for)
  File "/tmp/agents-local/workspace/pytorch/torch/testing/_internal/common_device_type.py", line 1065, in instantiate_device_type_tests
    device_type_test_class.instantiate_test(
  File "/tmp/agents-local/workspace/pytorch/torch/testing/_internal/common_device_type.py", line 625, in instantiate_test
    instantiate_test_helper(
  File "/tmp/agents-local/workspace/pytorch/torch/testing/_internal/common_device_type.py", line 531, in instantiate_test_helper
    test = decorator(test)
           ^^^^^^^^^^^^^^^
  File "/tmp/agents-local/workspace/pytorch/torch/testing/_internal/opinfo/core.py", line 1713, in __call__
    raise RuntimeError("Multiple sets of sample_skips_and_xfails defined")
RuntimeError: Multiple sets of sample_skips_and_xfails defined
RAW_BUFFERClick to expand / collapse

🐛 Describe the bug

On source builds with CUDA, python test/functorch/test_vmap.py fails before any tests are run:

Traceback (most recent call last):
  File "/tmp/agents-local/workspace/pytorch/test/functorch/test_vmap.py", line 6575, in <module>
    instantiate_device_type_tests(TestVmapOperatorsOpInfo, globals(), only_for=only_for)
  File "/tmp/agents-local/workspace/pytorch/torch/testing/_internal/common_device_type.py", line 1065, in instantiate_device_type_tests
    device_type_test_class.instantiate_test(
  File "/tmp/agents-local/workspace/pytorch/torch/testing/_internal/common_device_type.py", line 625, in instantiate_test
    instantiate_test_helper(
  File "/tmp/agents-local/workspace/pytorch/torch/testing/_internal/common_device_type.py", line 531, in instantiate_test_helper
    test = decorator(test)
           ^^^^^^^^^^^^^^^
  File "/tmp/agents-local/workspace/pytorch/torch/testing/_internal/opinfo/core.py", line 1713, in __call__
    raise RuntimeError("Multiple sets of sample_skips_and_xfails defined")
RuntimeError: Multiple sets of sample_skips_and_xfails defined

This behavior seems to have been introduced by #183541

Versions

H100 and GB200 with source build of latest main

cc @mruberry @zou3519 @Chillee @samdow @kshitij12345

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

pytorch - 💡(How to fix) Fix [Test] `functorch/test_vmap.py` RuntimeError during test setup with CPU and CUDA [1 pull requests]