Skip to content

Add unit tests for ROCm compatibility matrix#123

Open
maheswari2418 wants to merge 2 commits into
rishabh0510rishabh:mainfrom
maheswari2418:test-rocm-matrix
Open

Add unit tests for ROCm compatibility matrix#123
maheswari2418 wants to merge 2 commits into
rishabh0510rishabh:mainfrom
maheswari2418:test-rocm-matrix

Conversation

@maheswari2418
Copy link
Copy Markdown

@maheswari2418 maheswari2418 commented May 22, 2026

Describe your changes in detail

Added comprehensive unit tests for the ROCm compatibility matrix module.

Changes Made

  • Added tests for valid and invalid ROCm version lookups
  • Added parameterized tests for framework compatibility mappings
  • Added GPU architecture compatibility checks
  • Added edge case coverage for unsupported frameworks and versions
  • Verified all tests pass locally with pytest

Testing

poetry run python -m pytest tests/test_rocm_matrix.py

All tests are passing successfully.

Related Issues

Fixes #70

Summary by CodeRabbit

Release Notes

  • Tests
    • Added comprehensive test coverage for ROCm compatibility matrix validation, including version lookup, framework support verification, GPU architecture mapping, and data consistency checks.

Review Change Stack

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

@maheswari2418 is attempting to deploy a commit to the rishabhmishra0510-5147's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 22552283-f9f1-4f91-b01d-e4a7bf4867cf

📥 Commits

Reviewing files that changed from the base of the PR and between fca82d4 and 2203570.

📒 Files selected for processing (1)
  • backend/tests/test_rocm_matrix.py

📝 Walkthrough

Walkthrough

A new test module validates the ROCm compatibility matrix API. Tests cover entry retrieval by version, framework compatibility lookups, and data structure consistency through parameterized assertions on valid/invalid inputs and GPU architecture mappings.

Changes

ROCm Compatibility Matrix Test Suite

Layer / File(s) Summary
ROCm entry retrieval tests
backend/tests/test_rocm_matrix.py
Imports the ROCm matrix API and tests get_rocm_entry for valid versions (verifying version string, driver minimums, and GPU architecture presence) and invalid versions (asserting None return).
Framework ROCm support lookups
backend/tests/test_rocm_matrix.py
Tests get_supported_rocm_for_framework with parameterized framework/version pairs to verify correct ROCm lists, and asserts empty results for unknown frameworks or unsupported versions.
Matrix data consistency validation
backend/tests/test_rocm_matrix.py
Validates SUPPORTED_ROCM_VERSIONS matches sorted ROCM_MATRIX keys, and parameterized tests confirm specific ROCm versions include expected GPU architectures in supported_gpus.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

level:intermediate

Suggested reviewers

  • rishabh0510rishabh

Poem

🐰 A matrix of ROCm tests, now aligned,
GPU architectures verified, no stone left behind,
Framework and version queries tested with care,
AMD hardware mapping—precision laid bare!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding unit tests for ROCm compatibility matrix.
Linked Issues check ✅ Passed The PR implements all key requirements from issue #70: test coverage for ROCm matrix functions, parameterized test cases for architectures, isolated unit tests, and proper test organization in backend/tests/.
Out of Scope Changes check ✅ Passed All changes are scoped to adding test coverage for ROCm compatibility matrix; no unrelated modifications are present.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@rishabh0510rishabh
Copy link
Copy Markdown
Owner

hey @maheswari2418
Thank you for your contribution! The CI is currently failing due to a missing trailing newline at the end of one of the files in the backend (as flagged by the Ruff linter). To resolve this, please add a blank line at the end of the file indicated in the error message. You can do this manually, or, for convenience, run the following command in the backend directory to let Ruff fix these issues automatically:
cd backend
ruff check app/ tests/ --fix
Once you’ve pushed the change, the CI should pass. Let me know if you need any help!

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.

[Testing] Add Unit Tests for ROCm Compatibility Matrix

2 participants