canonical / checkbox

Checkbox is a testing framework used to validate device compatibility with Ubuntu Linux. It’s the testing tool developed for the purposes of the Ubuntu Certification program.
https://checkbox.readthedocs.io
GNU General Public License v3.0
33 stars 50 forks source link

Add amd gpgpu tests (New) #1531

Closed pedro-avalos closed 4 weeks ago

pedro-avalos commented 1 month ago

Description

Resolved issues

Addresses CHECKBOX-969 and CHECKBOX-1539.

Documentation

Coverage tests are included with this PR.

Tests

I tested this on my desktop, which has an AMD GPU (AMD Radeon RX 6750 XT). NOTE: For some AMD GPUs, you may need to change the environment variable HSA_OVERRIDE_GFX_VERSION for rvs to recognize that your GPU is compatible with some ROCm/HIP functions. For example, for my GPU, I had to edit the value to 10.3.0.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 47.81%. Comparing base (cd772da) to head (ab38aaf). Report is 17 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1531 +/- ## ========================================== + Coverage 47.72% 47.81% +0.09% ========================================== Files 370 371 +1 Lines 39739 39808 +69 Branches 6719 6730 +11 ========================================== + Hits 18965 19034 +69 Misses 20059 20059 Partials 715 715 ``` | [Flag](https://app.codecov.io/gh/canonical/checkbox/pull/1531/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical) | Coverage Δ | | |---|---|---| | [provider-gpgpu](https://app.codecov.io/gh/canonical/checkbox/pull/1531/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical) | `83.78% <100.00%> (+26.64%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pedro-avalos commented 1 month ago

One design question I'd like some feedback on is how rvs.py takes the modules as positional arguments. Since we're likely to just use these one at a time in Checkbox jobs, should these be subparsers instead? If they are subparsers, then we could conceivably add the module configuration as options for those subparsers. The more I think about it, they should be subparsers. Let me know what you think!

fernando79513 commented 1 month ago

akes the modules as positional arguments. Since we're likely to just use these one at a time in Checkbox jobs, should these be subparsers instead? If they are subparsers, then we could conceivably add the module configuration as options for those subparsers. The more I think about it, they should be subparsers. Let me know what you think!

I think the configs are complex enough to be kept into separated config files. I would restrict the modules parameter to run only one module, and I think you could simplify the argparser by setting choices for the possible modules:

    parser.add_argument(
        "modules",
        metavar="MOD",
        nargs="*",
        choices=RVS_MODULES.keys(),
        type=str,
        help="RVS modules to run [{}]".format(", ".join(RVS_MODULES)),
    )