[None][test] Enhance performance tests by adding GPU availability check in test_perf.py#12535
[None][test] Enhance performance tests by adding GPU availability check in test_perf.py#12535yufeiwu-nv merged 8 commits intoNVIDIA:mainNVIDIA/TensorRT-LLM:mainfrom
Conversation
Signed-off-by: yufeiwu-nv <230315618+yufeiwu-nv@users.noreply.github.com>
…rf.py. Skip tests if required GPUs exceed available devices. Signed-off-by: yufeiwu-nv <230315618+yufeiwu-nv@users.noreply.github.com>
📝 WalkthroughWalkthroughAdds GPU availability validation to performance test configuration. The Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/bot --skip --comment "only test list modify" |
GitHub Bot Help
Provide a user friendly way for developers to interact with a Jenkins server. Run See details below for each supported subcommand. Details
Launch build/test pipelines. All previously running jobs will be killed.
kill
Kill all running builds associated with pull request. skip
Skip testing for latest commit on pull request. reuse-pipeline
Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/integration/defs/perf/test_perf.py`:
- Around line 978-982: Wrap the get_device_count() call in a try/except and
treat detection errors as zero GPUs so the guard cannot hard-fail; specifically,
call get_device_count() inside a try block, set available_gpus = 0 in the except
(optionally capture the exception string), then perform the check if
self.num_gpus > available_gpus and call pytest.skip(...) with a message that
includes self.num_gpus and available_gpus (this ensures tests requesting any
GPUs are skipped when detection fails or when available_gpus == 0).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4458a8c0-eb69-49a0-8b5b-d73dfce0b9d7
📒 Files selected for processing (1)
tests/integration/defs/perf/test_perf.py
|
/bot skip --comment "only test list modify" |
|
PR_Github #40664 [ skip ] triggered by Bot. Commit: |
|
PR_Github #40664 [ skip ] completed with state |
|
/bot skip --comment "only test list modify" |
|
PR_Github #40722 [ skip ] triggered by Bot. Commit: |
|
/bot skip --comment "only test list modify" |
|
PR_Github #40831 [ skip ] triggered by Bot. Commit: |
|
PR_Github #40831 [ skip ] completed with state |
Summary by CodeRabbit
Description
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.