-
Notifications
You must be signed in to change notification settings - Fork 294
[CK_TILE] Add GetName for GEMM kernels #1791
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
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
0c4cf86
[CK_TILE] Add GetName functions for Gemm Kernels
aledudek ff5115b
[CK_TILE] Add GetName for grouped gemm
aledudek 8adaf41
[CK_TILE] Add GetName for gemm - review changes
aledudek 67ab389
Merge branch 'develop' into gemm_getname
aledudek 67e305e
Merge branch 'develop' into getname_gemm
aledudek c32aa3f
Merge branch 'develop' into getname_gemm
aledudek 08aad5e
[CK_TILE] Print also gemm problem pipeline and shape
aledudek 56e6326
[CK_TILE] Print also GemmPipelineScheduler
aledudek 8866825
Merge branch 'develop' into getname_gemm
aledudek 615fd8f
[CK_TILE] GetName - fixed Scheduler <<operator visibility
aledudek 6e7ac86
Merge branch 'develop' into getname_gemm
aledudek 9258ed7
[CK_TILE] GetName info adjustments
aledudek 5522165
Merge branch 'develop' into getname_gemm
aledudek 75a3989
[CK_TILE] GetName post-merge fix
aledudek 3416bef
[CK_TILE] GetName - add general concat function
aledudek afa81a7
[CK_TILE] GetName - small adjustments, format change
aledudek 98b3516
Merge branch 'develop' into getname_gemm
aledudek d9c6a64
post merge develop fix
aledudek 711b2dd
Remove commented code
aledudek 800cf89
Merge from internal (#1857)
illsilin 2bef550
restore cron trigger (#1863)
illsilin 5bb041b
add vectorloads on non-k dim for memory pipelines (#1856)
jakpiase feb656d
Support for dtypes (fp8, bf8, bf16 and fp16) for the ck_tile/03_gemm …
kylasa 932071a
Extract prec_str and add separator to concat
aledudek 510abd9
Merge branch 'develop' into getname_gemm
aledudek 0f063f3
GetName add
aledudek b5d201d
CK Tile - small fix to hotloop scheduler & KPack value. (#1867)
aosewski ce51797
Merge branch 'develop' into getname_gemm
aledudek 8976171
Merge branch 'develop' into getname_gemm
aledudek f4607cf
Merge branch 'getname_gemm' of https://github.com/ROCm/composable_ker…
aledudek fa3afaf
Resolve merge issues
aledudek 7857894
Merge branch 'develop' into getname_gemm
aledudek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| // Copyright (c) 2025, Advanced Micro Devices, Inc. All rights reserved. | ||
|
|
||
| #pragma once | ||
|
|
||
| #include "ck_tile/ops/gemm/pipeline/gemm_pipeline_ag_bg_cr_scheduler.hpp" | ||
|
|
||
| namespace ck_tile { | ||
|
|
||
| template <typename T> | ||
| struct IsCharArray : std::false_type | ||
| { | ||
| }; | ||
|
|
||
| template <std::size_t N> | ||
| struct IsCharArray<char[N]> : std::true_type | ||
| { | ||
| }; | ||
|
|
||
| template <std::size_t N> | ||
| struct IsCharArray<const char[N]> : std::true_type | ||
| { | ||
| }; | ||
|
|
||
| template <std::size_t N> | ||
| struct IsCharArray<char (&)[N]> : std::true_type | ||
| { | ||
| }; | ||
|
|
||
| template <std::size_t N> | ||
| struct IsCharArray<const char (&)[N]> : std::true_type | ||
| { | ||
| }; | ||
|
|
||
| template <typename... Ts> | ||
| inline constexpr bool AllConvertibleToStringView = ((std::is_convertible_v<Ts, std::string_view> || | ||
| IsCharArray<Ts>::value || | ||
| std::is_same_v<Ts, char>)&&...); | ||
|
|
||
| template <typename... Ts> | ||
| [[nodiscard]] auto concat(const Ts&... xs) | ||
| -> std::enable_if_t<!AllConvertibleToStringView<Ts...>, std::string> | ||
| { | ||
| using ::operator<<; | ||
| thread_local std::ostringstream oss; | ||
| oss.str(""); | ||
|
|
||
| (oss << ... << xs); | ||
| return oss.str(); | ||
| } | ||
|
|
||
| template <std::size_t N> | ||
| [[nodiscard]] constexpr inline std::size_t getSize(char (&)[N]) noexcept | ||
| { | ||
| return N; | ||
| } | ||
|
|
||
| template <std::size_t N> | ||
| [[nodiscard]] constexpr inline std::size_t getSize(const char (&)[N]) noexcept | ||
| { | ||
| return N; | ||
| } | ||
|
|
||
| [[nodiscard]] constexpr inline std::size_t getSize(const char* s) noexcept | ||
| { | ||
| const char* end = s; | ||
| while(*end++ != 0) {} | ||
| return end - s - 1; | ||
| } | ||
|
|
||
| [[nodiscard]] constexpr inline std::size_t getSize(const char&) noexcept { return 1; } | ||
|
|
||
| [[nodiscard]] inline std::size_t getSize(const std::string& s) noexcept { return s.size(); } | ||
|
|
||
| [[nodiscard]] constexpr inline std::size_t getSize(const std::string_view& s) noexcept | ||
| { | ||
| return s.size(); | ||
| } | ||
|
|
||
| template <typename... Ts> | ||
| auto concatInto(std::string& result, const Ts&... xs) | ||
| -> std::enable_if_t<AllConvertibleToStringView<Ts...>, void> | ||
| { | ||
| const std::size_t space = (1 + ... + getSize(xs)); | ||
| result.reserve(result.size() + space); | ||
| ((result += xs), ...); | ||
| } | ||
|
|
||
| template <typename... Ts> | ||
| [[nodiscard]] auto concat(const Ts&... xs) | ||
| -> std::enable_if_t<AllConvertibleToStringView<Ts...>, std::string> | ||
| { | ||
| std::string result; | ||
| concatInto(result, xs...); | ||
| return result; | ||
| } | ||
|
|
||
| // Function for types convertible to std::string_view | ||
| template <typename Sep, typename First, typename... Rest> | ||
| [[nodiscard]] auto concat(Sep sep, const First& first, const Rest&... rest) | ||
| -> std::enable_if_t<AllConvertibleToStringView<First, Rest...>, std::string> | ||
| { | ||
| std::string result; | ||
| result += first; | ||
| ((result += sep, result += rest), ...); | ||
| return result; | ||
| } | ||
|
|
||
| // Function for other types | ||
| template <typename Sep, typename First, typename... Rest> | ||
| [[nodiscard]] auto concat(Sep sep, const First& first, const Rest&... rest) | ||
| -> std::enable_if_t<!AllConvertibleToStringView<First, Rest...>, std::string> | ||
| { | ||
| using ::operator<<; | ||
| thread_local std::ostringstream oss; | ||
| oss.str(""); | ||
| oss << first; | ||
| ((oss << sep << rest), ...); | ||
| return oss.str(); | ||
| } | ||
|
|
||
| } // namespace ck_tile |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| // Copyright (c) 2025, Advanced Micro Devices, Inc. All rights reserved. | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <iostream> | ||
| #include <string> | ||
|
|
||
| #include "ck_tile/core.hpp" | ||
|
|
||
| namespace ck_tile { | ||
|
|
||
| // clang-format off | ||
| template <typename T> struct typeToStr; | ||
| template <> struct typeToStr<float> { static constexpr const char * name = "fp32"; }; | ||
| template <> struct typeToStr<fp16_t> { static constexpr const char * name = "fp16"; }; | ||
| template <> struct typeToStr<bf16_t> { static constexpr const char * name = "bf16"; }; | ||
| template <> struct typeToStr<fp8_t> { static constexpr const char * name = "fp8"; }; | ||
| template <> struct typeToStr<bf8_t> { static constexpr const char * name = "bf8"; }; | ||
| template <> struct typeToStr<int8_t> { static constexpr const char * name = "int8"; }; | ||
| // clang-format on | ||
|
|
||
| template <typename ADataType_, typename BDataType_> | ||
| std::string gemm_prec_str() | ||
| { | ||
| std::string base_str = std::string(typeToStr<ADataType_>::name); | ||
| if(!std::is_same_v<ADataType_, BDataType_>) | ||
| { | ||
| base_str += "_" + std::string(typeToStr<BDataType_>::name); | ||
| } | ||
| return base_str; | ||
| } | ||
|
|
||
| } // namespace ck_tile | ||
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.