OpenBMB / OpenBMB/UltraEval-Audio

CPU-only execution fails with AssertionError: Torch not compiled with CUDA enabled

Open
#46 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
324
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Bug: CPU-only execution fails with AssertionError: Torch not compiled with CUDA enabled

Description

I am trying to run the benchmark suite on a machine with a CPU-only PyTorch installation. The execution fails with:

AssertionError: Torch not compiled with CUDA enabled

From my investigation, at some point the code sets the device to cuda:0, which eventually triggers the error. However, I could not identify where this device selection happens.

What I checked

  • I reviewed the documented CLI arguments and could not find any option to force CPU execution.
  • I searched through the configuration and entry points but the codebase is relatively large and the device-selection logic is difficult to follow.
  • I added some debug prints and confirmed that cuda:0 is being selected internally before the failure occurs.

Expected behavior

If CUDA is unavailable (or if PyTorch was compiled without CUDA support), the benchmark should either:

  1. Automatically fall back to CPU execution, or
  2. Expose a documented option/configuration parameter to explicitly select cpu, or
  3. Fail early with a clear message explaining that CUDA is currently required.

A common pattern would be:

device = "cuda" if torch.cuda.is_available() else "cpu"

instead of assuming CUDA is always available.

Environment

  • OS: macos
  • conda env as specified in the readme

Question

Is CPU-only execution currently supported?

If yes, could you point me to the correct way to force CPU execution?

If not, would you consider adding a CPU fallback or a documented device-selection option?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the documented CLI arguments, configuration, and benchmark entry points to find where the device is assigned, then reproduce the failure with a CPU-only PyTorch installation. Done means CPU execution works or device selection is documented, or the benchmark fails early with a clear CUDA requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.