Files
composable_kernel/test/ck_tile/permute/test_permute_cases.inc
rahjain-amd 4d041837ad Add json dump support to output details from CK/CKTile Examples. (#2551)
* Adding RapidJson Library

* Adding Json Dumps in all CK_Tile Examples

Not verified yet

* Adding json to cktile Batched Transpose

* adding json dumps to layernorm2d_fwd

* Adding  json dump to flatmm_basic

* Adding RapidJson Library

* Adding Json Dumps in all CK_Tile Examples

Not verified yet

* Adding json to cktile Batched Transpose

* adding json dumps to layernorm2d_fwd

* Adding  json dump to flatmm_basic

* Adding json in 03_gemm

* Add json dump to 16_batched_gemm

* Add json dump to gemm_multi_d_fp16

* Add json dump to grouped_gemm

* fix fmha_bwd/fwd

* Fix clang-format errors

exclude include/rapidjson in jenkins as its a third-party library

* Saparating function and defination.

* Update Documentation of 03_gemm

* Refactoring as per code review

* Disable fp8 instances on unsupported targets (#2592)

* Restrict building of gemm_universal_preshuffle_f8 instances to specific targets in CMakeLists.txt

* Add condition to skip gemm_xdl_universal_preshuffle_f8 instances for unsupported targets in CMakeLists.txt

* Add conditions to skip unsupported targets for gemm_universal_preshuffle_f8 and gemm_xdl_universal_preshuffle_f8 instances in CMakeLists.txt

* Refine conditions to exclude gemm_universal_preshuffle_f8 instances for unsupported targets in CMakeLists.txt

---------

Co-authored-by: AviralGoelAMD <aviralgoel@amd.com>

* fix clang format

* remove duplicate lines of code from library/src/tensor_operation_instance/gpu/CMakeLists.txt

* Fixing Readme and unifying jsondumps

* adding moe_smoothquant

* adding fused_moe

* Fixing Readme for batched_gemm

* Fixing Readme for grouped_gemm

* adding flatmm

* adding gemm_multi_d_fp16

* adding elementwise

* adding File name when json is dumped

* Fixing Reduce after merge

* adding batched_transpose

* Adding Warptile in Gemm

* Fixing Clang Format

---------

Co-authored-by: Aviral Goel <aviral.goel@amd.com>
Co-authored-by: AviralGoelAMD <aviralgoel@amd.com>
Co-authored-by: illsilin_amdeng <Illia.Silin@amd.com>
2025-09-02 23:31:29 -07:00

280 lines
6.2 KiB
C++

// Copyright © Advanced Micro Devices, Inc., or its affiliates.
// SPDX-License-Identifier: MIT
#pragma once
#ifndef TEST_PERMUTE_CASES_INC
#define TEST_PERMUTE_CASES_INC
TYPED_TEST(TEST_SUITE_NAME, Permute1)
{
std::vector<ck_tile::index_t> shape{3, 8};
std::string perm{"1,0"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute2)
{
std::vector<ck_tile::index_t> shape{48, 6, 8};
std::string perm{"2,1,0"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute3)
{
std::vector<ck_tile::index_t> shape{24, 128, 3};
std::string perm{"0,2,1"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute4)
{
std::vector<ck_tile::index_t> shape{4, 10, 7, 6};
std::string perm{"0,2,3,1"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute5)
{
std::vector<ck_tile::index_t> shape{8, 24, 36, 10};
std::string perm{"3,1,2,0"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute6)
{
std::vector<ck_tile::index_t> shape{8, 1, 36, 4};
std::string perm{"2,1,0,3"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute7)
{
std::vector<ck_tile::index_t> shape{5, 10, 16, 2, 36, 4};
std::string perm{"4,5,2,1,0,3"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute8)
{
std::vector<ck_tile::index_t> shape{2, 32, 8, 3, 6, 2, 5, 4};
std::string perm{"5,2,4,7,1,6,3,0"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute9)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{3, 6, 4, 32, 16, 2, 8};
std::string perm{"0,1,4,2,5,3,6"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute10)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{5, 10, 4, 32, 8, 2, 8};
std::string perm{"0,1,4,2,5,3,6"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute11)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{3, 8, 4, 16, 16, 4, 8};
std::string perm{"0,1,4,2,5,3,6"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute12)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{3, 6, 4, 32, 16, 2, 8};
std::string perm{"0,1,2,4,5,3,6"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute13)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{5, 10, 4, 32, 8, 2, 8};
std::string perm{"0,1,2,4,5,3,6"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute14)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{3, 8, 4, 16, 16, 4, 8};
std::string perm{"0,1,2,4,5,3,6"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute15)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{2, 8, 16, 8, 4, 8};
std::string perm{"0,1,3,4,2,5"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute16)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{1, 24, 32, 16, 2, 8};
std::string perm{"0,1,3,4,2,5"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute17)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{3, 8};
std::string perm{"1,0"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute18)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{48, 6, 8};
std::string perm{"2,1,0"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute19)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{24, 128, 3};
std::string perm{"0,2,1"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute20)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{4, 10, 7, 6};
std::string perm{"0,2,3,1"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute21)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{8, 24, 36, 10};
std::string perm{"3,1,2,0"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute22)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{8, 1, 36, 4};
std::string perm{"2,1,0,3"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute23)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{5, 10, 16, 2, 36, 4};
std::string perm{"4,5,2,1,0,3"};
this->Run(shape, perm);
}
TYPED_TEST(TEST_SUITE_NAME, Permute24)
{
if constexpr(!std::is_same_v<TypeParam, F16Types>)
{
GTEST_SKIP() << "Skipping this test: Only run with fp16";
}
std::vector<ck_tile::index_t> shape{2, 32, 8, 3, 6, 2, 5, 4};
std::string perm{"5,2,4,7,1,6,3,0"};
this->Run(shape, perm);
}
#endif