mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-16 19:09:59 +00:00
Merge commit 'b60af5bde965a2bb007bb582f7836b43ca647b81' into develop
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
#include "profiler/profile_max_pool3d_bwd_impl.hpp"
|
||||
#include "test_pool_fwd_common.hpp"
|
||||
|
||||
static ck::index_t param_mask = 0xffff;
|
||||
static ck::index_t instance_index = -1;
|
||||
|
||||
template <typename Tuple>
|
||||
class TestMaxPool3dBwd : public ::testing::Test
|
||||
{
|
||||
@@ -20,8 +23,13 @@ class TestMaxPool3dBwd : public ::testing::Test
|
||||
|
||||
void Run()
|
||||
{
|
||||
for(auto param : params)
|
||||
for(size_t i = 0; i < this->params.size(); i++)
|
||||
{
|
||||
if((param_mask & (1 << i)) == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
auto& param = this->params[i];
|
||||
bool success =
|
||||
ck::profiler::profile_max_pool3d_bwd_impl<InDataType,
|
||||
OutDataType,
|
||||
@@ -37,7 +45,8 @@ class TestMaxPool3dBwd : public ::testing::Test
|
||||
param.window_strides_,
|
||||
param.window_dilations_,
|
||||
param.input_left_pads_,
|
||||
param.input_right_pads_);
|
||||
param.input_right_pads_,
|
||||
instance_index);
|
||||
EXPECT_TRUE(success);
|
||||
}
|
||||
}
|
||||
@@ -77,3 +86,20 @@ TYPED_TEST(TestMaxPool3dBwd, Test_Pool)
|
||||
|
||||
this->Run();
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user