Skip to content

Fix logging bug when asking for more GPUs than available - #1935

Draft
Bubullzz wants to merge 1 commit into
NVIDIA:mainfrom
Bubullzz:fix_log
Draft

Bubullzz wants to merge 1 commit into
NVIDIA:mainfrom
Bubullzz:fix_log

Conversation

@Bubullzz

Copy link
Copy Markdown
Contributor

No description provided.

@copy-pr-bot

copy-pr-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@Bubullzz Bubullzz added feature request New feature or request non-breaking Introduces a non-breaking change labels Sep 18, 2026
@Bubullzz

Copy link
Copy Markdown
Contributor Author

/ok to test 9082458

@github-actions

Copy link
Copy Markdown

CI Test Summary

1 failed · 30 passed · 0 skipped

conda-cpp-tests / 13.3.0, 3.13, amd64, ubuntu26.04, rtxpro6000, latest-driver, latest-deps — 2 failed tests
  • DefaultServerTests.DeleteQueuedJobPreventsRun
  • DefaultServerTests.DeleteRunningJobCancelsWorker

Comment thread cpp/cuopt_cli.cpp
CUOPT_LOG_ERROR("num-gpus=%d exceeds the number of visible CUDA devices: %d.",
requested_gpus,
device_count);
return -1;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to just issue the warning and continue the solve with the current available GPUs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why we wouldn't rather want to fail loudly ? if the user specifically asks to solve with --num-gpus 4 it is very likely they explicitely want a solve with 4 gpus. If we don't see 4 GPUs then the user will want to check their setup rather than a solve on 1 or 2 GPUs. If they don't care and want to use the max number of GPUs they can just set -1.
Did I miss something ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a design choice. Usually we prefer to complete a solve rather if we can recover, rather than failing.

Note this only happens through the command-line interface. What are you doing with the other APIs? Are you failing hard there as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request New feature or request non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants