-
Notifications
You must be signed in to change notification settings - Fork 262
[CK_BUILDER] Convolution forward transfer concepts. #3535
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces robust compile-time validation for convolution forward transfer operations by replacing individual static assertions with composite concepts that validate block transfers comprehensively. The changes improve code maintainability through consistent naming conventions and add helper utilities for compile-time checks.
Key changes:
- Introduced composite validation concepts (
ValidABlockTransfer,ValidBBlockTransfer,ValidCBlockTransfer) that replace multiple individualstatic_assertstatements with comprehensive checks for vector size, access order, cluster size, and tile coverage - Renamed
block_transfer_access_ordertothread_cluster_arrange_orderthroughout the codebase for improved clarity - Added stricter layout validation checks using the
IsValidLayoutconcept in factory classes
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
conv_algorithm_limits.hpp |
Added helper utilities in detail namespace for computing cluster sizes, coverage, and vector size constraints; introduced composite validation concepts |
conv_fwd_xdl_factory.hpp |
Replaced individual assertions with composite concepts; added comprehensive layout validation |
conv_fwd_wmma_factory.hpp |
Replaced individual assertions with composite concepts; added layout validation |
conv_fwd_v3_factory.hpp |
Replaced individual assertions with composite concepts; added layout validation |
conv_fwd_large_tensor_factory.hpp |
Replaced individual assertions with composite concepts; added layout validation |
conv_algorithm_concepts.hpp |
Updated concept definitions to use new thread_cluster_arrange_order naming |
conv_block_transfer.hpp |
Updated helper function to use new thread_cluster_arrange_order naming |
conv_algorithm_types.hpp |
Renamed struct member from block_transfer_access_order to thread_cluster_arrange_order |
test_conv_description.cpp |
Updated test configurations to use new naming convention |
ckb_conv_test_configs.hpp |
Updated test configurations to use new naming convention; adjusted vector size values |
conv_algorithm_type_utils.hpp |
Updated string conversion to use new naming convention |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vpietila-amd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, looks good to me. Only some minor comment for possible improvements.
The main changes include the introduction of composite concepts for validating block transfers, the replacement of legacy naming for access order, and the addition of helper utilities for compile-time checks.
In this PR transfer concepts are validated just in xdl, v3, wmma and large tensor factories. More would be added in following PRs.
Key changes:
Validation and Concepts
Introduced composite concepts (
ValidABlockTransfer,ValidBBlockTransfer,ValidCBlockTransfer) that encapsulate multiple checks for block transfer validity, including vector size, access order, cluster size, and tile coverage. These replace several individualstatic_assertsin factory classes, enabling more robust compile-time validation. [1] [2] [3] [4] [5]Added helper utilities in the
detailnamespace to compute cluster sizes, coverage, and vector size constraints at compile time, supporting the new validation concepts.Access Order Naming Consistency
block_transfer_access_ordertothread_cluster_arrange_orderthroughout the codebase for clarity and consistency, including in concepts, struct members, and helper functions. [1] [2] [3] [4] [5]Layout Validation
IsValidLayoutconcept, ensuring only supported tensor layouts are accepted and that vectorization occurs on the correct dimension. [1] [2] [3] [4]