Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
composable_kernel_ROCM
Commits
598cfd77
Commit
598cfd77
authored
Oct 07, 2024
by
Andriy Roshchenko
Browse files
Merge branch 'origin/gfx950' into 'andriy/lwpck-2243'.
parents
79a4b17f
87ea11d0
Changes
202
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
28 deletions
+25
-28
test/pool/test_max_pool3d_fwd.cpp
test/pool/test_max_pool3d_fwd.cpp
+19
-27
test/pool/test_pool_fwd_common.hpp
test/pool/test_pool_fwd_common.hpp
+6
-1
No files found.
test/pool/test_max_pool3d_fwd.cpp
View file @
598cfd77
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-202
3
, Advanced Micro Devices, Inc. All rights reserved.
// Copyright (c) 2018-202
4
, Advanced Micro Devices, Inc. All rights reserved.
#include "gtest/gtest.h"
#include "profiler/profile_pool3d_fwd_impl.hpp"
...
...
@@ -16,10 +16,20 @@ class TestMaxPool3dFwd : public ::testing::Test
std
::
vector
<
PoolingParam
>
params
;
ck
::
profiler
::
PoolFwdInputParams
in_params_max_pool
{
true
,
2
,
false
,
false
,
false
,
0
};
ck
::
profiler
::
PoolFwdInputParams
in_params_max_pool_indexed
{
true
,
2
,
false
,
false
,
true
,
0
};
void
Run
()
{
for
(
auto
param
:
params
)
{
ck
::
profiler
::
PoolFwdKernelParams
kernel_params
{
param
.
length_
,
param
.
window_spatial_lengths_
,
param
.
window_strides_
,
param
.
window_dilations_
,
param
.
input_left_pads_
,
param
.
input_right_pads_
};
// max pool
bool
success
=
ck
::
profiler
::
profile_pool3d_fwd_impl
<
InDataType
,
...
...
@@ -30,16 +40,7 @@ class TestMaxPool3dFwd : public ::testing::Test
ck
::
tensor_layout
::
convolution
::
NDHWC
,
ck
::
ReduceTensorOp
::
MAX
,
false
,
false
>
(
true
,
2
,
false
,
false
,
param
.
length_
,
param
.
window_spatial_lengths_
,
param
.
window_strides_
,
param
.
window_dilations_
,
param
.
input_left_pads_
,
param
.
input_right_pads_
);
false
>
(
in_params_max_pool
,
kernel_params
);
EXPECT_TRUE
(
success
);
// max pool + index
...
...
@@ -51,27 +52,18 @@ class TestMaxPool3dFwd : public ::testing::Test
ck
::
tensor_layout
::
convolution
::
NDHWC
,
ck
::
ReduceTensorOp
::
MAX
,
false
,
true
>
(
true
,
2
,
false
,
false
,
param
.
length_
,
param
.
window_spatial_lengths_
,
param
.
window_strides_
,
param
.
window_dilations_
,
param
.
input_left_pads_
,
param
.
input_right_pads_
);
true
>
(
in_params_max_pool_indexed
,
kernel_params
);
EXPECT_TRUE
(
success
);
}
}
};
#ifdef CK_ENABLE_FP16
using
KernelTypes
=
::
testing
::
Types
<
std
::
tuple
<
F16
,
F16
,
F32
,
I32
>
,
std
::
tuple
<
F32
,
F32
,
F32
,
I32
>>
;
#else
using
KernelTypes
=
::
testing
::
Types
<
std
::
tuple
<
F32
,
F32
,
F32
,
I32
>>
;
#endif
using
KernelTypes
=
::
testing
::
Types
<
std
::
tuple
<
I8
,
I8
,
I8
,
I32
>
,
std
::
tuple
<
F8
,
F8
,
F8
,
I32
>
,
std
::
tuple
<
F16
,
F16
,
F16
,
I32
>
,
std
::
tuple
<
BF16
,
BF16
,
BF16
,
I32
>
,
std
::
tuple
<
F32
,
F32
,
F32
,
I32
>>
;
TYPED_TEST_SUITE
(
TestMaxPool3dFwd
,
KernelTypes
);
TYPED_TEST
(
TestMaxPool3dFwd
,
Test_Pool
)
...
...
test/pool/test_pool_fwd_common.hpp
View file @
598cfd77
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-202
3
, Advanced Micro Devices, Inc. All rights reserved.
// Copyright (c) 2018-202
4
, Advanced Micro Devices, Inc. All rights reserved.
#include "gtest/gtest.h"
#include "ck/ck.hpp"
using
I8
=
int8_t
;
using
F8
=
ck
::
f8_t
;
using
F16
=
ck
::
half_t
;
using
BF16
=
ck
::
bhalf_t
;
using
F32
=
float
;
using
I32
=
int32_t
;
using
I8
=
int8_t
;
using
F8
=
ck
::
f8_t
;
using
ck
::
index_t
;
using
NDHWC
=
ck
::
tensor_layout
::
convolution
::
NDHWC
;
using
NHWC
=
ck
::
tensor_layout
::
convolution
::
NHWC
;
struct
PoolingParam
{
...
...
Prev
1
…
7
8
9
10
11
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment