Skip to content

[Tests] Use requires_gpu, fix missing gpu test skip, add explicit test for gpu from gha#1264

Merged
dsikka merged 4 commits intomainfrom
kylesayrs/add-cuda-check
Apr 30, 2025
Merged

[Tests] Use requires_gpu, fix missing gpu test skip, add explicit test for gpu from gha#1264
dsikka merged 4 commits intomainfrom
kylesayrs/add-cuda-check

Conversation

@kylesayrs
Copy link
Collaborator

@kylesayrs kylesayrs commented Mar 18, 2025

Purpose

  • Update all tests to use requires_gpu decorator
  • Add GPU mark skip for test_compressor_stacking, which requires a GPU
  • Add an explicit GPU test for GHA, so as to unambiguously catch situations where CUDA is not properly installed on a runner

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
@kylesayrs kylesayrs self-assigned this Mar 18, 2025
@github-actions
Copy link

👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review.

Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed.

Copy link
Collaborator

@dsikka dsikka left a comment

Choose a reason for hiding this comment

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

Why not update/use existing tools?

def requires_gpu(test_case):

@kylesayrs
Copy link
Collaborator Author

kylesayrs commented Mar 18, 2025

@dsikka If you're referring to here I'm just following the convention of the file. Theoretically we could consolidate these methods at some point, esp if we want to support amd

@kylesayrs kylesayrs requested a review from dsikka March 18, 2025 17:12
@kylesayrs kylesayrs added the ready When a PR is ready for review label Mar 27, 2025
Copy link
Collaborator

@dsikka dsikka left a comment

Choose a reason for hiding this comment

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

still not sure why we need this if these exist: tests/testing_utils.py

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
@kylesayrs
Copy link
Collaborator Author

@dsikka All tests are now updated to use requires_gpu

@kylesayrs kylesayrs changed the title [Tests] Add mark skip for GPU [Tests] Use requires_gpu, fix missing gpu test skip, add explicit test for gpu from gha Apr 30, 2025
@dsikka dsikka enabled auto-merge (squash) April 30, 2025 14:29
@dsikka dsikka merged commit e168e3a into main Apr 30, 2025
8 checks passed
@dsikka dsikka deleted the kylesayrs/add-cuda-check branch April 30, 2025 15:03
kylesayrs added a commit that referenced this pull request May 4, 2025
…t for gpu from gha (#1264)

## Purpose ##
* Update all tests to use `requires_gpu` decorator
* Add GPU mark skip for `test_compressor_stacking`, which requires a GPU
* Add an explicit GPU test for GHA, so as to unambiguously catch
situations where CUDA is not properly installed on a runner

---------

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready When a PR is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants