mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-20 04:49:54 +00:00
Merge commit 'b60af5bde965a2bb007bb582f7836b43ca647b81' into develop
This commit is contained in:
@@ -10,6 +10,9 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include "test_grouped_gemm_util.hpp"
|
||||
|
||||
ck::index_t param_mask = 0xffffff;
|
||||
ck::index_t instance_index = -1;
|
||||
|
||||
using F16 = ck::half_t;
|
||||
using BF16 = ck::bhalf_t;
|
||||
using F8 = ck::f8_t;
|
||||
@@ -42,3 +45,19 @@ using KernelTypes = ::testing::Types<
|
||||
TYPED_TEST_SUITE(TestGroupedGemm, KernelTypes);
|
||||
|
||||
#include "test_grouped_gemm_ut_cases.inc"
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
if(argc == 1) {}
|
||||
else if(argc == 3)
|
||||
{
|
||||
param_mask = strtol(argv[1], nullptr, 0);
|
||||
instance_index = atoi(argv[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Usage of " << argv[0] << std::endl;
|
||||
std::cout << "Arg1,2: param_mask instance_index(-1 means all)" << std::endl;
|
||||
}
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
#include "ck/utility/number.hpp"
|
||||
#include "profiler/profile_grouped_gemm_impl.hpp"
|
||||
|
||||
extern ck::index_t param_mask;
|
||||
extern ck::index_t instance_index;
|
||||
|
||||
namespace ck {
|
||||
namespace test {
|
||||
|
||||
@@ -109,8 +112,16 @@ class TestGroupedGemm : public testing::Test
|
||||
{
|
||||
SetStrides<ELayout>(stride_cs, Ms, Ns);
|
||||
}
|
||||
std::vector<int> k_batches;
|
||||
for(size_t i = 0; i < k_batches_.size(); i++)
|
||||
{
|
||||
if(param_mask & (1 << i))
|
||||
{
|
||||
k_batches.push_back(k_batches_[i]);
|
||||
}
|
||||
}
|
||||
|
||||
RunSingle(Ms, Ns, Ks, stride_as, stride_bs, stride_cs, k_batches_);
|
||||
RunSingle(Ms, Ns, Ks, stride_as, stride_bs, stride_cs, k_batches);
|
||||
}
|
||||
|
||||
void RunSingle(const std::vector<int>& Ms,
|
||||
@@ -139,7 +150,8 @@ class TestGroupedGemm : public testing::Test
|
||||
StrideCs,
|
||||
kbatches,
|
||||
n_warmup_,
|
||||
n_iter_);
|
||||
n_iter_,
|
||||
instance_index);
|
||||
EXPECT_TRUE(pass);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user