mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-07-03 05:37:34 +00:00
first commit
This commit is contained in:
46
test/ck_tile/kernel_launch/test_kernel_launch.cpp
Normal file
46
test/ck_tile/kernel_launch/test_kernel_launch.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (c) 2025, Advanced Micro Devices, Inc. All rights reserved.
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include <hip/hip_runtime.h>
|
||||
#include "ck_tile/host.hpp"
|
||||
|
||||
using ck_tile::stream_config;
|
||||
TEST(Kernel, old)
|
||||
{
|
||||
stream_config s1;
|
||||
s1.time_kernel_ = true;
|
||||
s1.cold_niters_ = 1;
|
||||
s1.nrepeat_ = 2;
|
||||
ck_tile::launch_kernel(s1, // timer for all kernel
|
||||
[=](const stream_config& s[[maybe_unused]]) { printf("0, "); },
|
||||
[=](const stream_config& s[[maybe_unused]]) { printf("1, "); },
|
||||
[=](const stream_config& s[[maybe_unused]]) { printf("2, "); }
|
||||
);
|
||||
}
|
||||
|
||||
TEST(Kernel, new_1)
|
||||
{
|
||||
stream_config s1;
|
||||
s1.time_kernel_ = true;
|
||||
s1.cold_niters_ = 2;
|
||||
s1.nrepeat_ = 2;
|
||||
ck_tile::launch_kernel<1, 2>(s1, // timer for kernel [1, 2)
|
||||
[=](const stream_config& s[[maybe_unused]]) { printf("0, "); },
|
||||
[=](const stream_config& s[[maybe_unused]]) { printf("1, "); },
|
||||
[=](const stream_config& s[[maybe_unused]]) { printf("2, "); }
|
||||
);
|
||||
}
|
||||
|
||||
TEST(Kernel, new_2)
|
||||
{
|
||||
stream_config s1;
|
||||
s1.time_kernel_ = true;
|
||||
s1.cold_niters_ = 2;
|
||||
s1.nrepeat_ = 2;
|
||||
ck_tile::launch_kernel<1>(s1, // timer for kernel [1, N)
|
||||
[=](const stream_config& s[[maybe_unused]]) { printf("0, "); },
|
||||
[=](const stream_config& s[[maybe_unused]]) { printf("1, "); },
|
||||
[=](const stream_config& s[[maybe_unused]]) { printf("2, "); }
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user