mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-03 05:01:25 +00:00
* Add more printing to core cktile * Revert other changes in static encoding pattern * Refactor to using a free print() function * Remove loops and print just the containers * Print tuple with better formatting, fix sequence compilation * Add some tests for print utility * Add print utility header * Print for static_encoding_pattern * add buffer_view printing * Align vector_traits * Fix formatting * Lower-case enum strings Co-authored-by: Christopher Millette <63608002+cgmillette@users.noreply.github.com> * Remove empty comment lines * Fix test with lower-case too * Reduce repeated code in print tests, move helper function closer to type definition, test X&Y * Add test_print_common.hpp * add print.hpp in core.hpp --------- Co-authored-by: Aviral Goel <aviral.goel@amd.com> Co-authored-by: Christopher Millette <63608002+cgmillette@users.noreply.github.com> Co-authored-by: Adam Osewski <19374865+aosewski@users.noreply.github.com>
46 lines
1.0 KiB
C++
46 lines
1.0 KiB
C++
// SPDX-License-Identifier: MIT
|
|
// Copyright (c) 2025, Advanced Micro Devices, Inc. All rights reserved.
|
|
|
|
#include "test_print_common.hpp"
|
|
#include "ck_tile/core/utility/print.hpp"
|
|
#include "ck_tile/core/container/sequence.hpp"
|
|
|
|
namespace ck_tile {
|
|
|
|
class PrintSequenceTest : public PrintTest
|
|
{
|
|
};
|
|
|
|
TEST_F(PrintSequenceTest, PrintSimpleSequence)
|
|
{
|
|
// Test printing sequence<1, 5, 8>
|
|
constexpr auto seq = sequence<1, 5, 8>{};
|
|
|
|
std::string output = CapturePrintOutput(seq);
|
|
|
|
// Verify the output format
|
|
EXPECT_EQ(output, "sequence<1, 5, 8>");
|
|
}
|
|
|
|
TEST_F(PrintSequenceTest, PrintSingleElementSequence)
|
|
{
|
|
// Test printing sequence<42>
|
|
constexpr auto seq = sequence<42>{};
|
|
|
|
std::string output = CapturePrintOutput(seq);
|
|
|
|
EXPECT_EQ(output, "sequence<42>");
|
|
}
|
|
|
|
TEST_F(PrintSequenceTest, PrintEmptySequence)
|
|
{
|
|
// Test printing sequence<> (empty sequence)
|
|
constexpr auto seq = sequence<>{};
|
|
|
|
std::string output = CapturePrintOutput(seq);
|
|
|
|
EXPECT_EQ(output, "sequence<>");
|
|
}
|
|
|
|
} // namespace ck_tile
|