[Bugfix] Fix the test data distribution of cumsum #432
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 includes updates to improve functionality, maintainability, and documentation across multiple files. Key changes involve enhancing loop fusion behavior, updating test utilities, refining cumulative sum logic, and adding comprehensive documentation for a key function.
Functional Improvements:
annotationsfrom the original loop are now preserved when creating a fused loop inParallelLoopFuser, ensuring that metadata is carried over during fusion. (src/transform/common/loop_fusion_utils.h, src/transform/common/loop_fusion_utils.hL222-R222)test_tilelang_language_cumsum.pyhas been updated to include an additionalcumsumoperation before flipping back, ensuring correctness for reverse operations. (testing/python/language/test_tilelang_language_cumsum.py, testing/python/language/test_tilelang_language_cumsum.pyL67-R68)Testing Enhancements:
tl.TensorSupplyType.Randninstead oftl.TensorSupplyType.One, introducing randomness for more robust test coverage. (testing/python/language/test_tilelang_language_cumsum.py, testing/python/language/test_tilelang_language_cumsum.pyL56-R56)Documentation Improvements:
cumsumfunction inreduce.py, explaining its purpose, arguments, and return value, while also adding validation for thedimparameter to prevent out-of-bounds errors. (tilelang/language/reduce.py, tilelang/language/reduce.pyR129-R146)