You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky WSL cuda.bindings benchmark smoke test: pyperf raises ValueError: benchmark function returned zero #1885
I expect this will haunt us until we tweak the test.
Cursor-generated writeup:
Description
The WSL CI lane Test linux-64 / py3.12, 13.2.0, wheels, rtx4090, wsl can fail in the Run cuda.bindings benchmarks (smoke test) step with a zero-duration pyperf measurement:
python run_pyperf.py --fast --loops 1 --min-time 0
...
ValueError: benchmark function returned zero
This does not look like a functional CUDA regression. In the failing run, the job had already completed:
Run cuda.pathfinder tests with see_what_works
Run cuda.bindings tests
and then failed specifically in:
Run cuda.bindings benchmarks (smoke test)
The benchmark smoke step currently comes from .github/workflows/test-wheel-linux.yml:
With --loops 1 --min-time 0, a zero-length timing sample on WSL and fast hardware seems plausible, so this looks like a benchmark flake rather than a deterministic product failure.
+ pushd cuda_bindings/benchmarks
+ python run_pyperf.py --fast --loops 1 --min-time 1
/__w/cuda-python/cuda-python/cuda_bindings/benchmarks /__w/cuda-python/cuda-python
Traceback (most recent call last):
File "/__w/cuda-python/cuda-python/cuda_bindings/benchmarks/run_pyperf.py", line 8, in <module>
main()
File "/__w/cuda-python/cuda-python/cuda_bindings/benchmarks/runner/main.py", line 99, in main
runner.bench_time_func(bench_id, registry[bench_id])
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pyperf/_runner.py", line 502, in bench_time_func
result = self._main(task)
^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pyperf/_runner.py", line 463, in _main
bench = self._worker(task)
^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pyperf/_runner.py", line 437, in _worker
run = task.create_run()
^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pyperf/_worker.py", line 300, in create_run
self.compute()
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pyperf/_worker.py", line 364, in compute
WorkerTask.compute(self)
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pyperf/_worker.py", line 289, in compute
self.compute_warmups_values()
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pyperf/_worker.py", line 271, in compute_warmups_values
self._compute_values(self.values, args.values)
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pyperf/_worker.py", line 85, in _compute_values
raise ValueError("benchmark function returned zero")
ValueError: benchmark function returned zero
Traceback (most recent call last):
File "/__w/cuda-python/cuda-python/cuda_bindings/benchmarks/run_pyperf.py", line 8, in <module>
main()
File "/__w/cuda-python/cuda-python/cuda_bindings/benchmarks/runner/main.py", line 99, in main
runner.bench_time_func(bench_id, registry[bench_id])
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pyperf/_runner.py", line 502, in bench_time_func
result = self._main(task)
^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pyperf/_runner.py", line 468, in _main
bench = self._manager()
^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pyperf/_runner.py", line 681, in _manager
bench = Manager(self).create_bench()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pyperf/_manager.py", line 243, in create_bench
worker_bench, run = self.create_worker_bench()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pyperf/_manager.py", line 142, in create_worker_bench
suite = self.create_suite()
^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pyperf/_manager.py", line 136, in create_suite
suite = self.spawn_worker(0, 0)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/pyperf/_manager.py", line 118, in spawn_worker
raise RuntimeError("%s failed with exit code %s"
RuntimeError: /opt/hostedtoolcache/Python/3.12.13/x64/bin/python failed with exit code 1
....
Error: Process completed with exit code 1.
Activity
danielfrg commentedon Apr 9, 2026
from all the things i expected to fail on windows that was not one of them :D
I'll make a PR today.
Fix #1885 add min-time to benchmark smoke test
Fix NVIDIA#1885 add min-time to benchmark smoke test (NVIDIA#1889)
rwgk commentedon Apr 12, 2026
@danielfrg I'm still seeing a flake:
First attempt (one job failed, see section from log below):
Rerun (the previously failing job succeeded):
Could you please take another look?