Skip to content

[stride when Swizzle] Accept stride_a=0, support --any_stride for bench#1079

Merged
mengzcai merged 2 commits into
developfrom
user/mengzcai/strideForSwizzleA
Aug 12, 2025
Merged

[stride when Swizzle] Accept stride_a=0, support --any_stride for bench#1079
mengzcai merged 2 commits into
developfrom
user/mengzcai/strideForSwizzleA

Conversation

@mengzcai
Copy link
Copy Markdown
Contributor

@mengzcai mengzcai commented Aug 6, 2025

previous PR: #979

KKyang
KKyang previously approved these changes Aug 6, 2025
@solaslin solaslin force-pushed the user/mengzcai/strideForSwizzleA branch from d236465 to b60d99e Compare August 7, 2025 07:08
Copy link
Copy Markdown
Contributor

@solaslin solaslin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to add stride_a: 0 back to gtest yaml, but I know we can't write stride_a: [0, default].
One option is to copy-paste the swizzle gtest and make another ......_swizzleA_stride_a0.
But there is actually a simpler way to achieve this:

Add a definition in the matmul_gtest.yaml:

  - &swizzleA_arguments
    - {}
    - { stride_a: 0 }

Then use arguments: in your test case:

- name: matmul_swizzleA
  category: pre_checkin
  function:
    matmul: *real_precisions_swizzleA_support
  arguments: *swizzleA_arguments
  M: [128, 129]
  N: [128, 129]
  K: [128, 129]

This will expand the tests like stride_a: [0, unset]

I strongly recommend to add this since this PR is proving swizzle accepts stride_a 0.
Remember to add both on matmul_swizzleA and matmul_extapi_swizzleA

Comment thread projects/hipblaslt/library/src/amd_detail/rocblaslt/src/rocblaslt_auxiliary.cpp Outdated
@solaslin solaslin dismissed their stale review August 7, 2025 15:02

needs more verifications

Comment thread projects/hipblaslt/library/src/amd_detail/rocblaslt/src/rocblaslt_auxiliary.cpp Outdated
@mengzcai mengzcai force-pushed the user/mengzcai/strideForSwizzleA branch 2 times, most recently from 28e883b to a0b9426 Compare August 7, 2025 17:58
@mengzcai
Copy link
Copy Markdown
Contributor Author

mengzcai commented Aug 7, 2025

@solaslin Thanks for the provided method. It has been added to GTest.

@mengzcai mengzcai requested review from KKyang and solaslin August 7, 2025 18:03
Comment thread projects/hipblaslt/clients/include/hipblaslt_common.yaml Outdated
@mengzcai mengzcai force-pushed the user/mengzcai/strideForSwizzleA branch from a0b9426 to bbae294 Compare August 8, 2025 03:19
@solaslin solaslin self-requested a review August 8, 2025 03:20
Copy link
Copy Markdown
Contributor

@solaslin solaslin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for changing ! LG

add swizzle_arguments to gtest: defualt stride & stride0

remove setDefaultSwizzledBatchedStride()
@mengzcai mengzcai force-pushed the user/mengzcai/strideForSwizzleA branch from 89131db to f0c9d69 Compare August 8, 2025 03:30
@mengzcai mengzcai merged commit 23c35b2 into develop Aug 12, 2025
12 checks passed
@mengzcai mengzcai deleted the user/mengzcai/strideForSwizzleA branch August 12, 2025 07:58
assistant-librarian Bot pushed a commit to ROCm/hipBLASLt that referenced this pull request Aug 12, 2025
[stride when Swizzle] Accept stride_a=0, support --any_stride
 for bench (#1079)

previous PR: [#979](ROCm/rocm-libraries#979)

Co-authored-by: mengzcai <mengzcai@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants