mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-05 14:11:29 +00:00
* parse examples inside the add_example_executable function * fix the example 64 cmake file * add xdl flag to the gemm_bias_softmax_gemm_permute example * add filtering of tests based on architecture type * enable test_grouped_gemm for gfx9 only * enable test_transpose only for gfx9 * only linnk test_transpose if it gets built * split the gemm instances by architectures * split gemm_bilinear,grouped_conv_bwd_weight instances by targets * split instances by architecture * split grouped_conv instances by architecture * fix clang format * fix the if-else logic in group_conv headers * small fix for grouped convolution instances * fix the grouped conv bwd weight dl instances * fix client examples * only enable client examples 3 and 4 on gfx9 * set the gfx9 macro * make sure the architecture macros are set by cmake * use separate set of xdl/wmma flags for host code * sinmplify the main cmake file * add conv_fwd_bf8 instance declaration
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
// SPDX-License-Identifier: MIT
|
|
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
|
|
#include "gtest/gtest.h"
|
|
#include "profiler/profile_transpose_impl.hpp"
|
|
|
|
using F16 = ck::half_t;
|
|
using F32 = float;
|
|
using ck::index_t;
|
|
|
|
template <typename Tuple>
|
|
class TestTranspose : public ::testing::Test
|
|
{
|
|
protected:
|
|
using ADataType = std::tuple_element_t<0, Tuple>;
|
|
using BDataType = std::tuple_element_t<1, Tuple>;
|
|
|
|
void Run()
|
|
{
|
|
std::vector<std::vector<ck::index_t>> lengths = {
|
|
{4, 16, 16, 32, 5}, {8, 16, 16, 32, 8} /**{32, 16, 16, 32, 8},**/};
|
|
|
|
for(auto length : lengths)
|
|
{
|
|
bool success = ck::profiler::profile_transpose_impl<ADataType, BDataType, 5>(
|
|
true, 2, false, false, length);
|
|
EXPECT_TRUE(success);
|
|
}
|
|
}
|
|
};
|
|
|
|
using KernelTypes = ::testing::Types<std::tuple<F16, F16>, std::tuple<F32, F32>>;
|
|
|
|
TYPED_TEST_SUITE(TestTranspose, KernelTypes);
|
|
TYPED_TEST(TestTranspose, Test_FP16) { this->Run(); }
|
|
TYPED_TEST(TestTranspose, Test_FP32) { this->Run(); }
|