mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-04 21:51:28 +00:00
[CK_TILE] Multiple-ABD GEMM example (#2788)
* Multi ABD - initial commit * Clang-foramt fix * block gemm, unify the name of CDataType * Apply chnages to mem-pipeline * Rollback prefix for DType and Layout * Gemm Kernel Basic, rename * WMMA config * Grouped GEMM * Clang-format * Dropout, name * Review v2 * Move element_wise fn to unnary, remov old ones fn * clang-format * Fix issue review * WP operator adjust to universal gemm * v2 prepare * Remove unused comment * Remove vectorsize * Rollback * Adjust pipeline for abd * Shuffle argument * CI-fail fix quant * Fix ag_br pipeline * Failing tests * Typo * Single argument support
This commit is contained in:
@@ -392,6 +392,23 @@ struct PassThrough
|
||||
}
|
||||
};
|
||||
|
||||
struct AddScale
|
||||
{
|
||||
template <typename E, typename... As>
|
||||
CK_TILE_HOST_DEVICE constexpr void operator()(E& a, const As&... as) const
|
||||
{
|
||||
// Start with the base value c
|
||||
float result = ck_tile::type_convert<float>(0.0f);
|
||||
|
||||
// Add by each D parameter using fold expression
|
||||
((result += ck_tile::type_convert<float>(as)), ...);
|
||||
|
||||
a = ck_tile::type_convert<E>(scale * result);
|
||||
}
|
||||
|
||||
float scale = 1.0;
|
||||
};
|
||||
|
||||
struct MultiDMultiply
|
||||
{
|
||||
template <typename E, typename C, typename... Ds>
|
||||
|
||||
Reference in New Issue
Block a user