[Feature] use pytest for sgl-kernel#4697
Closed
adarshxs wants to merge 17 commits intosgl-project:mainfrom
Closed
Conversation
zhyncs
reviewed
Mar 23, 2025
Collaborator
|
|
zhyncs
reviewed
Mar 26, 2025
Collaborator
Author
|
@zhyncs one test is failing. Increasing tolerance should help? |
Collaborator
|
nice work~ |
zhyncs
suggested changes
Mar 29, 2025
| ) | ||
| @pytest.mark.parametrize("out_dtype", [torch.float16, torch.bfloat16]) | ||
| def test_grouped_gemm_accuracy(out_dtype): | ||
| Ms = [1, 16, 32, 256, 1024] |
Collaborator
There was a problem hiding this comment.
For different shapes you should use @pytest.mark.parametrize instead of for loop
| ) | ||
| def test_gemm(): | ||
| print("Testing GEMM:") | ||
| for m in (64, 128, 4096): |
|
|
||
| def test_m_grouped_gemm_contiguous(): | ||
| print("Testing grouped contiguous GEMM:") | ||
| for num_groups, m, k, n in ( |
|
|
||
|
|
||
| def test_accuracy(): | ||
| Ms = [1, 128, 512, 1024, 4096] |
|
|
||
|
|
||
| def test_accuracy(): | ||
| Ms = [1, 128, 512, 1024, 4096] |
|
|
||
|
|
||
| def test_accuracy(): | ||
| Ms = [1, 16, 32, 64, 128, 512, 1024, 4096, 8192] |
Collaborator
Author
|
apologies messed up. opening a new PR |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
For: #4690
Modifications
test files in: https://github.com/sgl-project/sglang/tree/main/sgl-kernel/tests
Checklist