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
Commits
289f15de
Commit
289f15de
authored
Dec 09, 2022
by
aska-0096
Browse files
Merge branch 'develop' of
https://github.com/ROCmSoftwarePlatform/composable_kernel
into wmma_gemm
parents
9bd44685
d58b7f51
Changes
371
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
18 additions
and
21 deletions
+18
-21
test/grouped_convnd_fwd/grouped_convnd_fwd.cpp
test/grouped_convnd_fwd/grouped_convnd_fwd.cpp
+1
-1
test/grouped_gemm/grouped_gemm_fp16.cpp
test/grouped_gemm/grouped_gemm_fp16.cpp
+1
-1
test/normalization/test_groupnorm_fp16.cpp
test/normalization/test_groupnorm_fp16.cpp
+1
-1
test/normalization/test_groupnorm_fp32.cpp
test/normalization/test_groupnorm_fp32.cpp
+1
-1
test/normalization/test_layernorm2d_fp16.cpp
test/normalization/test_layernorm2d_fp16.cpp
+1
-1
test/normalization/test_layernorm2d_fp32.cpp
test/normalization/test_layernorm2d_fp32.cpp
+1
-1
test/reduce/reduce_no_index.cpp
test/reduce/reduce_no_index.cpp
+1
-1
test/reduce/reduce_with_index.cpp
test/reduce/reduce_with_index.cpp
+1
-1
test/reference_conv_fwd/reference_conv_fwd.cpp
test/reference_conv_fwd/reference_conv_fwd.cpp
+9
-9
test/softmax/test_softmax_util.hpp
test/softmax/test_softmax_util.hpp
+1
-1
test/wmma_op/wmma_op.cpp
test/wmma_op/wmma_op.cpp
+0
-3
No files found.
test/grouped_convnd_fwd/grouped_convnd_fwd.cpp
View file @
289f15de
...
...
@@ -7,7 +7,7 @@
#include <vector>
#include <gtest/gtest.h>
#include "profiler/
include/
profile_grouped_conv_fwd_impl.hpp"
#include "profiler/profile_grouped_conv_fwd_impl.hpp"
class
TestGroupedConvNdFwd
:
public
::
testing
::
Test
{
...
...
test/grouped_gemm/grouped_gemm_fp16.cpp
View file @
289f15de
...
...
@@ -3,7 +3,7 @@
#include <iostream>
#include "profiler/
include/
profile_grouped_gemm_impl.hpp"
#include "profiler/profile_grouped_gemm_impl.hpp"
namespace
{
...
...
test/normalization/test_groupnorm_fp16.cpp
View file @
289f15de
...
...
@@ -2,7 +2,7 @@
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "gtest/gtest.h"
#include "profiler/
include/
profile_groupnorm_impl.hpp"
#include "profiler/profile_groupnorm_impl.hpp"
using
F16
=
ck
::
half_t
;
using
F32
=
float
;
...
...
test/normalization/test_groupnorm_fp32.cpp
View file @
289f15de
...
...
@@ -2,7 +2,7 @@
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "gtest/gtest.h"
#include "profiler/
include/
profile_groupnorm_impl.hpp"
#include "profiler/profile_groupnorm_impl.hpp"
using
F16
=
ck
::
half_t
;
using
F32
=
float
;
...
...
test/normalization/test_layernorm2d_fp16.cpp
View file @
289f15de
...
...
@@ -2,7 +2,7 @@
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "gtest/gtest.h"
#include "profiler/
include/
profile_layernorm_impl.hpp"
#include "profiler/profile_layernorm_impl.hpp"
using
F16
=
ck
::
half_t
;
using
F32
=
float
;
...
...
test/normalization/test_layernorm2d_fp32.cpp
View file @
289f15de
...
...
@@ -2,7 +2,7 @@
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include "gtest/gtest.h"
#include "profiler/
include/
profile_layernorm_impl.hpp"
#include "profiler/profile_layernorm_impl.hpp"
using
F16
=
ck
::
half_t
;
using
F32
=
float
;
...
...
test/reduce/reduce_no_index.cpp
View file @
289f15de
...
...
@@ -4,7 +4,7 @@
#include <getopt.h>
#include "ck/library/utility/host_common_util.hpp"
#include "profiler/
include/
profile_reduce_impl.hpp"
#include "profiler/profile_reduce_impl.hpp"
using
namespace
ck
;
...
...
test/reduce/reduce_with_index.cpp
View file @
289f15de
...
...
@@ -4,7 +4,7 @@
#include <getopt.h>
#include "ck/library/utility/host_common_util.hpp"
#include "profiler/
include/
profile_reduce_impl.hpp"
#include "profiler/profile_reduce_impl.hpp"
using
namespace
ck
;
...
...
test/reference_conv_fwd/reference_conv_fwd.cpp
View file @
289f15de
...
...
@@ -12,6 +12,7 @@
#include "ck/tensor_operation/gpu/element/element_wise_operation.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
#include "ck/library/utility/algorithm.hpp"
#include "ck/library/utility/check_err.hpp"
#include "ck/library/utility/fill.hpp"
#include "ck/library/utility/host_tensor.hpp"
...
...
@@ -54,7 +55,7 @@ run_reference_convolution_forward(const ck::utils::conv::ConvParam& conv_param,
fill_input_op
(
input
.
begin
(),
input
.
end
());
fill_weights_op
(
weights
.
begin
(),
weights
.
end
());
std
::
fill
(
host_output
.
begin
(),
host_output
.
end
(),
OutDataType
(
0.
f
)
)
;
ck
::
ranges
::
fill
<
OutDataType
>
(
host_output
,
0.
f
);
auto
ref_conv
=
ck
::
tensor_operation
::
host
::
ReferenceConvFwd
<
NDimSpatial
,
InDataType
,
...
...
@@ -122,7 +123,7 @@ TEST(ReferenceConvolutionFWD, Conv2DGNHWC)
508.5};
EXPECT_TRUE(ck::utils::check_err(
out_tensor.mDesc.GetLengths(), ref_dims, "Error: wrong output tensor dimensions!"));
EXPECT_TRUE(ck::utils::check_err(out_tensor
.mData
, ref_data, "Error: incorrect results!"));
EXPECT_TRUE(ck::utils::check_err(out_tensor, ref_data, "Error: incorrect results!"));
}
TEST(ReferenceConvolutionFWD, Conv2DGNHWCStridesDilationsPadding)
...
...
@@ -149,7 +150,7 @@ TEST(ReferenceConvolutionFWD, Conv2DGNHWCStridesDilationsPadding)
1323., 1323., 2002.5, 2002.5, 2038.5, 2038.5, 2074.5, 2074.5, 2110.5, 2110.5};
EXPECT_TRUE(ck::utils::check_err(
out_tensor.mDesc.GetLengths(), ref_dims, "Error: wrong output tensor dimensions!"));
EXPECT_TRUE(ck::utils::check_err(out_tensor
.mData
, ref_data, "Error: incorrect results!"));
EXPECT_TRUE(ck::utils::check_err(out_tensor, ref_data, "Error: incorrect results!"));
}
TEST(ReferenceConvolutionFWD, Conv1DGNWC)
...
...
@@ -178,7 +179,7 @@ TEST(ReferenceConvolutionFWD, Conv1DGNWC)
std::vector<float> ref_data{7.5, 13.5, 19.5, 25.5};
EXPECT_TRUE(ck::utils::check_err(
out_tensor.mDesc.GetLengths(), ref_dims, "Error: wrong output tensor dimensions!"));
EXPECT_TRUE(ck::utils::check_err(out_tensor
.mData
, ref_data, "Error: incorrect results!"));
EXPECT_TRUE(ck::utils::check_err(out_tensor, ref_data, "Error: incorrect results!"));
}
TEST(ReferenceConvolutionFWD, Conv1DGNWCStridesDilationsPadding)
...
...
@@ -207,7 +208,7 @@ TEST(ReferenceConvolutionFWD, Conv1DGNWCStridesDilationsPadding)
std::vector<float> ref_data{9., 9., 19.5, 19.5, 31.5, 31.5, 43.5, 43.5, 55.5, 55.5};
EXPECT_TRUE(ck::utils::check_err(
out_tensor.mDesc.GetLengths(), ref_dims, "Error: wrong output tensor dimensions!"));
EXPECT_TRUE(ck::utils::check_err(out_tensor
.mData
, ref_data, "Error: incorrect results!"));
EXPECT_TRUE(ck::utils::check_err(out_tensor, ref_data, "Error: incorrect results!"));
}
TEST(ReferenceConvolutionFWD, Conv1DGNWCSameOutputSize)
...
...
@@ -301,7 +302,7 @@ TEST(ReferenceConvolutionFWD, Conv1DGNWCSameOutputSize)
49.4, 49.4, 49.4, 49.4, 49.4, 49.4, 49.4, 49.4};
EXPECT_TRUE(ck::utils::check_err(
out_tensor2.mDesc.GetLengths(), ref_dims, "Error: wrong output tensor dimensions!"));
EXPECT_TRUE(ck::utils::check_err(out_tensor2
.mData
, ref_data, "Error: incorrect results!"));
EXPECT_TRUE(ck::utils::check_err(out_tensor2, ref_data, "Error: incorrect results!"));
}
#endif
...
...
@@ -340,8 +341,7 @@ TEST(ReferenceConvolutionFWD, Conv3DGNCDHW)
EXPECT_TRUE
(
ck
::
utils
::
check_err
(
out_tensor
.
mDesc
.
GetLengths
(),
ref_dims
,
"Error [case 1]: wrong output tensor dimensions!"
));
EXPECT_TRUE
(
ck
::
utils
::
check_err
(
out_tensor
.
mData
,
ref_data
,
"Error [case 1]: incorrect results!"
));
EXPECT_TRUE
(
ck
::
utils
::
check_err
(
out_tensor
,
ref_data
,
"Error [case 1]: incorrect results!"
));
}
TEST
(
ReferenceConvolutionFWD
,
Conv3DGNCDHWStridesDilations
)
...
...
@@ -388,5 +388,5 @@ TEST(ReferenceConvolutionFWD, Conv3DGNCDHWStridesDilations)
ref_dims
,
"Error [case 2]: wrong output tensor dimensions!"
));
EXPECT_TRUE
(
ck
::
utils
::
check_err
(
out_tensor
.
mData
,
ref_data
,
"Error [case 2]: incorrect results!"
,
1e-4
f
,
1e-6
f
));
out_tensor
,
ref_data
,
"Error [case 2]: incorrect results!"
,
1e-4
f
,
1e-6
f
));
}
test/softmax/test_softmax_util.hpp
View file @
289f15de
...
...
@@ -13,7 +13,7 @@
#include "ck/tensor_operation/gpu/device/impl/device_softmax_impl.hpp"
#include "ck/tensor_operation/gpu/element/element_wise_operation.hpp"
#include "include/ck/utility/data_type.hpp"
#include "profiler/
include/
profile_softmax_impl.hpp"
#include "profiler/profile_softmax_impl.hpp"
namespace
ck
{
...
...
test/wmma_op/wmma_op.cpp
View file @
289f15de
...
...
@@ -60,9 +60,6 @@ int main(int, char*[])
pass
&=
run_test
<
ck
::
half_t
,
ck
::
half_t
,
ck
::
half_t
,
ck
::
half_t
,
16
>
();
pass
&=
run_test
<
ck
::
bhalf_t
,
ck
::
bhalf_t
,
ck
::
bhalf_t
,
float
,
16
>
();
pass
&=
run_test
<
int8_t
,
int8_t
,
int32_t
,
int32_t
,
8
>
();
#ifdef CK_EXPERIMENTAL_BIT_INT_EXTENSION_INT4
pass
&=
run_test
<
int4_t
,
int4_t
,
int32_t
,
int32_t
,
8
>
();
#endif
// clang-format on
std
::
cout
<<
"TestGemm ..... "
<<
(
pass
?
"SUCCESS"
:
"FAILURE"
)
<<
std
::
endl
;
...
...
Prev
1
…
15
16
17
18
19
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