[BE] Add Complex Kernel Test #38
Closed
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.
This pull request introduces a new, comprehensive test case (
tests/test_complex_kernels.py
) to validate the trace parsing logic, especially for the recently addedlaunch_diff
feature.Motivation
The existing tests were insufficient to fully validate the parser's ability to handle more realistic scenarios involving multiple, distinct kernels and varied launch parameters within a single run. This test was created to provide a robust, end-to-end validation for the kernel grouping and launch diffing functionalities.
What the Test Does
Defines Two Kernels:
matmul_kernel
: An autotuned matrix multiplication kernel designed to test the parser's handling of autotuner-generated configurations.fused_op_kernel
: A simpler element-wise kernel used to test basic launch parameter variations.Multiple, Varied Launches:
matmul
kernel is launched three times with different input tensor shapes.fused_op
kernel is launched four times with different scalar arguments (scale_factor
) and compile-time constants (activation
).End-to-End Parsing:
tritonparse.utils.unified_parse
.How it Improves Testing
launch_diff
generation, ensuring that parameter variations are correctly identified and summarized.