Skip to content

fix:bf16x3:enable all instances on gfx950 - #3248

Merged
ThomasNing merged 4 commits into
developfrom
bf16x3_fix_final
Nov 21, 2025
Merged

ThomasNing merged 4 commits into
developfrom
bf16x3_fix_final

Conversation

@yingluAMD

@yingluAMD yingluAMD commented Nov 20, 2025 •

Copy link
Copy Markdown
Contributor

Proposed changes

BF16x3 share same instances as tf32/fp32 on gfx942. While some cases are not suitable for this instruction which introduce build fail on gfx950 platform. This PR is to fix those build errors and enable all instances on gfx950 similar to gfx942.

Checklist

Please put an x into the boxes that apply. You can also fill these out after creating the PR. If you're not sure, please don't hesitate to ask.

  • I have added tests relevant to the introduced functionality, and the unit tests are passing locally
  • I have added the test to REGRESSION_TESTS list defined at the top of CMakeLists.txt in tests/CMakeLists.txt, IF the test takes more than 30 seconds to run.
  • I have added inline documentation which enables the maintainers with understanding the motivation
  • I have removed the stale documentation which is no longer relevant after this pull request
  • (If this change is user-facing) I have added release notes which provide the end users with a brief summary of the improvement from this pull request
  • I have run clang-format on all changed files
  • Any dependent changes have been merged

Discussion

If this is a relatively large or complex change, feel free to start a discussion by explaining why you chose the solution you did and what alternatives you considered

@AviralGoelAMD

Copy link
Copy Markdown
Collaborator

Can we centralize this architecture check instead of scattering #if defined(gfx950) blocks throughout the instance files

In include/ck_tile/core/arch/arch.hpp, we have a similar function

CK_TILE_HOST_DEVICE constexpr index_t get_smem_capacity()
{
#if defined(__gfx950__)
    return 163840;
#else
    return 65536;
#endif
}

Something like adding a library/include/ck/library/tensor_operation_instance/conv_arch_config.hpp with:

namespace ck::tensor_operation::device::arch_config {
    constexpr index_t get_conv_k_per_block() {
    #if defined(__gfx950__)
        return 32;
    #else
        return 16;
    #endif
    }
}

easier to maintain if there are multiple arch(s) with different suitable k values.

If not, I'd atleast consider movie the ifdef condition to the top of the file. It looks awkward when its defined in the middle.

@yingluAMD

Copy link
Copy Markdown
Contributor Author

@AviralGoelAMD Sorry, I missed your comments before.
#if defined(__gfx950__) is a kind of workaround here. Because not all template params are suitable for gfx950 which is designed for gfx942. This workaround is to fix those compile failures, so they are where they are used.
I agree with you to use a general config global to align gfx950 and gf942 gaps. This PR is to quick enable all instances same as gfx942. For better performance consideration, I think double all KPerBlock for gfx950 may be a good choice. But it need large experiments. We can put it to another discussion.

AviralGoelAMD pushed a commit that referenced this pull request Nov 28, 2025
* fix:bf16x3:enable all instances on gfx950

* fix clang-format fail

* fix clang-format fail

* fix:modified wrong params previously
@yingluAMD yingluAMD mentioned this pull request Jan 23, 2026
1 of 7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants