Skip to content

Comments

test: extend CUDA test suite for PyTorch packages and CUDA_HOME#83

Merged
LalatenduMohanty merged 1 commit intoopendatahub-io:mainfrom
smoparth:issue/74-extend-cuda-test-suite
Feb 19, 2026
Merged

test: extend CUDA test suite for PyTorch packages and CUDA_HOME#83
LalatenduMohanty merged 1 commit intoopendatahub-io:mainfrom
smoparth:issue/74-extend-cuda-test-suite

Conversation

@smoparth
Copy link
Member

@smoparth smoparth commented Feb 17, 2026

Add tests to validate the packages from #70 and env var from #69:

  • CUDA_HOME env var equals /usr/local/cuda
  • libcupti.so present (cuda-cupti package)
  • libcusparseLt.so present (libcusparselt0 package)
  • libcudss.so present (libcudss0-cuda package)

Closes #74

Description

How Has This Been Tested?

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Summary by CodeRabbit

  • Tests
    • Added validation tests for CUDA environment: verifies CUDA_HOME location and expands library checks to include libcupti, libcusparseLt and libcudss, with clear guidance if libraries are missing.

@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Adds four tests to tests/test_cuda_image.py validating the CUDA_HOME environment variable and presence of three CUDA/PyTorch libraries (libcupti, libcusparseLt, libcudss) by querying the system linker cache (ldconfig).

Changes

Cohort / File(s) Summary
CUDA environment & CUDA/PyTorch library tests
tests/test_cuda_image.py
Added four tests: test_cuda_home(cuda_container) asserts CUDA_HOME == /usr/local/cuda; test_libcupti_present(cuda_container), test_libcusparselt_present(cuda_container), and test_libcudss_present(cuda_container) check for libcupti, libcusparseLt, and libcudss in ldconfig -p with guidance messages on failures.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 I hopped through bins and paths tonight,
Searching for cupti, sparseLt, cudss bright,
I sniffed CUDA_HOME at /usr/local/cuda too,
Tests now hop on, checking what's true — woo! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and concisely summarizes the main change: extending the CUDA test suite to include validation for PyTorch packages and the CUDA_HOME environment variable.
Linked Issues check ✅ Passed The PR fulfills all coding requirements from issue #74: adds tests for CUDA_HOME validation, libcupti, libcusparseLt, and libcudss presence via ldconfig checks.
Out of Scope Changes check ✅ Passed All changes are within scope—only four new test functions were added to tests/test_cuda_image.py directly addressing the requirements from issues #69 and #70.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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/test_cuda_image.py`:
- Around line 108-109: The assertion message in tests/test_cuda_image.py (the
assert on variable result from cuda_container.run("ldconfig -p | grep
libcusparseLt")) exceeds the 100-char line limit; shorten or wrap the message so
the line length is <=100 characters (for example, shorten the message text or
move part of it to a variable) while preserving the assertion and meaning that
libcusparseLt.so may be missing if returncode != 0.

Add tests to validate the packages from opendatahub-io#70 and env var from opendatahub-io#69:

- CUDA_HOME env var equals /usr/local/cuda
- libcupti.so present (cuda-cupti package)
- libcusparseLt.so present (libcusparselt0 package)
- libcudss.so present (libcudss0-cuda package)

Closes opendatahub-io#74

Signed-off-by: Shanmukh Pawan <smoparth@redhat.com>
@smoparth smoparth force-pushed the issue/74-extend-cuda-test-suite branch from 30e6659 to 56db1fc Compare February 17, 2026 17:52
@LalatenduMohanty LalatenduMohanty merged commit c2d4567 into opendatahub-io:main Feb 19, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend CUDA test suite for new packages and env vars

2 participants