mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-17 11:30:02 +00:00
* Initial implementation:
- add new thread group transfer supporting transpose instruction
- refactor AB transfer to switch between thread and wave tiles methods
* Add some comments and remove explicit wave and lane calculations
* Remove compiler option for performance
* fp16 example: use tuned instance
* Missing cleanup
* Integrate wave transfer in existing gemm and batched gemm instances
* Add fast instances
* extend implementation for 8 bit datatypes
packed types not supported
* Address review comments
* Optimize pipeline v1 and re-introduce compiler option
* Disable wave tile approach for b scale gemm
* Fix for clang20
* Avoid code duplication of amd_global_load_transpose_to_vgpr function
[ROCm/composable_kernel commit: 440358c168]
49 lines
1.5 KiB
C++
49 lines
1.5 KiB
C++
// SPDX-License-Identifier: MIT
|
|
// Copyright (c) 2025, Advanced Micro Devices, Inc. All rights reserved.
|
|
|
|
#include "common.hpp"
|
|
|
|
#include "ck/tensor_operation/gpu/device/impl/device_gemm_wmma_cshuffle_v3.hpp"
|
|
|
|
using ADataType = ck::half_t;
|
|
using BDataType = ck::half_t;
|
|
using AccDataType = float;
|
|
using CShuffleDataType = ck::half_t;
|
|
using CDataType = ck::half_t;
|
|
|
|
using ALayout = Col;
|
|
using BLayout = Row;
|
|
using CLayout = Row;
|
|
|
|
using AElementOp = PassThrough;
|
|
using BElementOp = PassThrough;
|
|
using CElementOp = PassThrough;
|
|
|
|
static constexpr auto GemmDefault = ck::tensor_operation::device::GemmSpecialization::Default;
|
|
|
|
// clang-format off
|
|
using DeviceGemmV2Instance = ck::tensor_operation::device::DeviceGemm_Wmma_CShuffleV3<
|
|
ALayout, BLayout, CLayout,
|
|
ADataType, BDataType, CDataType, AccDataType, CShuffleDataType,
|
|
PassThrough, PassThrough, PassThrough, GemmDefault,
|
|
256,
|
|
128, 256, 64,
|
|
8, 8,
|
|
16, 16,
|
|
2, 8,
|
|
S<8, 32, 1>, S<0, 2, 1>, S<0, 2, 1>,
|
|
1, 1, 8, 1,
|
|
S<8, 32, 1>, S<0, 2, 1>, S<0, 2, 1>,
|
|
1, 1, 8, 1,
|
|
1, 1,
|
|
S<1, 64, 1, 4>, 8,
|
|
ck::BlockGemmPipelineScheduler::Intrawave, ck::BlockGemmPipelineVersion::v1>;
|
|
// clang-format on
|
|
|
|
using ReferenceGemmInstance = ck::tensor_operation::host::
|
|
ReferenceGemm<ADataType, BDataType, CDataType, AccDataType, AElementOp, BElementOp, CElementOp>;
|
|
|
|
#include "run_gemm_example_v2.inc"
|
|
|
|
int main(int argc, char* argv[]) { return !run_gemm_splitk_example(argc, argv); }
|