Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add amd gpgpu tests (New) #1531

Merged
merged 27 commits into from
Oct 23, 2024
Merged

Add amd gpgpu tests (New) #1531

merged 27 commits into from
Oct 23, 2024

Conversation

pedro-avalos
Copy link
Collaborator

@pedro-avalos pedro-avalos commented Oct 4, 2024

Description

  • Added a wrapper for ROCm Validation suite that checks the result of the tests
  • Added AMD GPGPU test jobs using ROCm Validation Suite

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.

@pedro-avalos pedro-avalos added the enhancement New feature or request label Oct 4, 2024
@pedro-avalos pedro-avalos self-assigned this Oct 4, 2024
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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 Coverage Δ
provider-gpgpu 83.78% <100.00%> (+26.64%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pedro-avalos
Copy link
Collaborator Author

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
Copy link
Collaborator

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)),
    )

Copy link
Collaborator

@fernando79513 fernando79513 left a comment

Choose a reason for hiding this comment

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

Some small changes. You don't need to handle the return values if you are not going to use them. Consider just raising a SystemExit() with the message you want to simplify the code.

providers/gpgpu/bin/rvs.py Outdated Show resolved Hide resolved
providers/gpgpu/bin/rvs.py Outdated Show resolved Hide resolved
providers/gpgpu/bin/rvs.py Outdated Show resolved Hide resolved
providers/gpgpu/bin/rvs.py Outdated Show resolved Hide resolved
- Use `SystemExit` instead of unused return values.
- Don't use `re` where not needed
- Use `_validate_output` instead of overriding `_run`.
- Added some fail descriptors
- Remove unnecessary check in `parse_args` since I added the `choices` parameter
Since the script only runs one module at a time, it makes more sense to take the path to the config file directly.
providers/gpgpu/units/jobs.pxu Outdated Show resolved Hide resolved
providers/gpgpu/bin/rvs.py Outdated Show resolved Hide resolved
providers/gpgpu/bin/rvs.py Outdated Show resolved Hide resolved
providers/gpgpu/bin/rvs.py Show resolved Hide resolved
Copy link
Collaborator

@fernando79513 fernando79513 left a comment

Choose a reason for hiding this comment

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

LGTM +1!

@fernando79513 fernando79513 merged commit fc12ed5 into main Oct 23, 2024
40 checks passed
@fernando79513 fernando79513 deleted the add-amd-gpgpu-tests branch October 23, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants