-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added unit tests for CK Tile compute bound gemm pipeline (#1728)
- Loading branch information
Showing
5 changed files
with
90 additions
and
62 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Currently ck_tile is only built on gfx9 | ||
if(GPU_TARGETS MATCHES "gfx9") | ||
add_gtest_executable(test_ck_tile_gemm_mem_pipeline test_gemm_mem_pipeline.cpp) | ||
add_gtest_executable(test_ck_tile_gemm_pipeline test_gemm_pipeline.cpp) | ||
endif() |
This file was deleted.
Oops, something went wrong.
This file contains 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,42 @@ | ||
// SPDX-License-Identifier: MIT | ||
// Copyright (c) 2024, Advanced Micro Devices, Inc. All rights reserved. | ||
|
||
#include <tuple> | ||
|
||
#include "gtest/gtest.h" | ||
|
||
#include "ck_tile/host.hpp" | ||
#include "test_gemm_pipeline_util.hpp" | ||
|
||
using F16 = ck_tile::half_t; | ||
using F32 = float; | ||
using Row = ck_tile::tensor_layout::gemm::RowMajor; | ||
using Col = ck_tile::tensor_layout::gemm::ColumnMajor; | ||
using Intrawave = ck_tile::integral_constant<ck_tile::GemmPipelineScheduler, | ||
ck_tile::GemmPipelineScheduler::Intrawave>; | ||
using Interwave = ck_tile::integral_constant<ck_tile::GemmPipelineScheduler, | ||
ck_tile::GemmPipelineScheduler::Interwave>; | ||
using Mem = ck_tile::integral_constant<GemmPipelineType, GemmPipelineType::Mem>; | ||
using Comp = ck_tile::integral_constant<GemmPipelineType, GemmPipelineType::Comp>; | ||
|
||
// clang-format off | ||
using KernelTypes = ::testing::Types< | ||
// ALayout, BLayout, CLayout, ADataType, BDataType, AccDataType, CDataType, GemmPipelineScheduler, PipelineType | ||
std::tuple< Row, Row, Row, F16, F16, F32, F16, Intrawave, Mem>, | ||
std::tuple< Row, Row, Row, F16, F16, F32, F16, Intrawave, Comp>, | ||
std::tuple< Row, Row, Row, F16, F16, F32, F16, Interwave, Mem>, | ||
std::tuple< Row, Col, Row, F16, F16, F32, F16, Intrawave, Mem>, | ||
std::tuple< Row, Col, Row, F16, F16, F32, F16, Intrawave, Comp>, | ||
std::tuple< Row, Col, Row, F16, F16, F32, F16, Interwave, Mem>, | ||
std::tuple< Col, Row, Row, F16, F16, F32, F16, Intrawave, Mem>, | ||
std::tuple< Col, Row, Row, F16, F16, F32, F16, Intrawave, Comp>, | ||
std::tuple< Col, Row, Row, F16, F16, F32, F16, Interwave, Mem>, | ||
std::tuple< Col, Col, Row, F16, F16, F32, F16, Intrawave, Mem>, | ||
std::tuple< Col, Col, Row, F16, F16, F32, F16, Intrawave, Comp>, | ||
std::tuple< Col, Col, Row, F16, F16, F32, F16, Interwave, Mem> | ||
>; | ||
// clang-format on | ||
|
||
TYPED_TEST_SUITE(TestCkTileGemmPipeline, KernelTypes); | ||
|
||
#include "test_gemm_pipeline_ut_cases.inc" |
This file contains 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 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