-
Notifications
You must be signed in to change notification settings - Fork 333
[Bugfix] Fix copy region automation for dynamic extent #465
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
Merged
Conversation
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
…architectures (tile-ai#463) * Updated the TMA barrier validation in `inject_tma_barrier.cc` to check for non-empty `barrier_id_to_range_` before raising an error for missing `create_list_of_mbarrier`. * Refactored architecture checks in `phase.py` to utilize a new constant `SUPPORTED_TMA_ARCHS`, allowing for easier updates and improved readability in the target architecture validation logic.
* Added handling for variable extents in buffer_region_to_tile_region function to enhance type checking and error handling. * Introduced debug print statements to trace values of region extents and temporary extents during validation. * Updated logic to account for variable extent counts when determining alignment of extents.
…ion function * Eliminated unnecessary print statements that were used for debugging temporary extents and region extents. * Streamlined the code for better readability while maintaining the existing functionality of buffer region validation.
* Removed an unnecessary blank line in the buffer_region_to_tile_region function to improve code readability and maintain consistency in formatting.
lucifer1004
pushed a commit
to lucifer1004/tilelang
that referenced
this pull request
May 16, 2025
* [Refactor] Enhance TMA barrier validation and support for additional architectures (tile-ai#463) * Updated the TMA barrier validation in `inject_tma_barrier.cc` to check for non-empty `barrier_id_to_range_` before raising an error for missing `create_list_of_mbarrier`. * Refactored architecture checks in `phase.py` to utilize a new constant `SUPPORTED_TMA_ARCHS`, allowing for easier updates and improved readability in the target architecture validation logic. * [Refactor] Improve buffer region validation in copy.py * Added handling for variable extents in buffer_region_to_tile_region function to enhance type checking and error handling. * Introduced debug print statements to trace values of region extents and temporary extents during validation. * Updated logic to account for variable extent counts when determining alignment of extents. * [Refactor] Remove debug print statements in buffer_region_to_tile_region function * Eliminated unnecessary print statements that were used for debugging temporary extents and region extents. * Streamlined the code for better readability while maintaining the existing functionality of buffer region validation. * [Refactor] Clean up whitespace in buffer_region_to_tile_region function * Removed an unnecessary blank line in the buffer_region_to_tile_region function to improve code readability and maintain consistency in formatting.
LeiWang1999
added a commit
to LeiWang1999/tilelang
that referenced
this pull request
Jul 18, 2025
* [Refactor] Enhance TMA barrier validation and support for additional architectures (tile-ai#463) * Updated the TMA barrier validation in `inject_tma_barrier.cc` to check for non-empty `barrier_id_to_range_` before raising an error for missing `create_list_of_mbarrier`. * Refactored architecture checks in `phase.py` to utilize a new constant `SUPPORTED_TMA_ARCHS`, allowing for easier updates and improved readability in the target architecture validation logic. * [Refactor] Improve buffer region validation in copy.py * Added handling for variable extents in buffer_region_to_tile_region function to enhance type checking and error handling. * Introduced debug print statements to trace values of region extents and temporary extents during validation. * Updated logic to account for variable extent counts when determining alignment of extents. * [Refactor] Remove debug print statements in buffer_region_to_tile_region function * Eliminated unnecessary print statements that were used for debugging temporary extents and region extents. * Streamlined the code for better readability while maintaining the existing functionality of buffer region validation. * [Refactor] Clean up whitespace in buffer_region_to_tile_region function * Removed an unnecessary blank line in the buffer_region_to_tile_region function to improve code readability and maintain consistency in formatting.
LeiWang1999
added a commit
to LeiWang1999/tilelang
that referenced
this pull request
Jul 20, 2025
* [Refactor] Enhance TMA barrier validation and support for additional architectures (tile-ai#463) * Updated the TMA barrier validation in `inject_tma_barrier.cc` to check for non-empty `barrier_id_to_range_` before raising an error for missing `create_list_of_mbarrier`. * Refactored architecture checks in `phase.py` to utilize a new constant `SUPPORTED_TMA_ARCHS`, allowing for easier updates and improved readability in the target architecture validation logic. * [Refactor] Improve buffer region validation in copy.py * Added handling for variable extents in buffer_region_to_tile_region function to enhance type checking and error handling. * Introduced debug print statements to trace values of region extents and temporary extents during validation. * Updated logic to account for variable extent counts when determining alignment of extents. * [Refactor] Remove debug print statements in buffer_region_to_tile_region function * Eliminated unnecessary print statements that were used for debugging temporary extents and region extents. * Streamlined the code for better readability while maintaining the existing functionality of buffer region validation. * [Refactor] Clean up whitespace in buffer_region_to_tile_region function * Removed an unnecessary blank line in the buffer_region_to_tile_region function to improve code readability and maintain consistency in formatting.
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.
This pull request introduces a refinement to the
buffer_region_to_tile_regionfunction intilelang/language/copy.pyto handle cases where region extents contain variable (non-constant) values. The main changes include tracking variable extents and adjusting the logic for validating and aligning extents.Enhancements to extent validation and alignment:
variable_extent_countto track the number of non-constant (tir.IntImm) extents inregion_extents. This ensures that variable extents are correctly identified and skipped during validation.tmp_len) to account for the variable extents, ensuring the alignment logic operates correctly when variable extents are present.