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
de1afb7b
Commit
de1afb7b
authored
Oct 19, 2023
by
Rostyslav Geyyer
Browse files
Merge branch 'develop' of
https://github.com/ROCmSoftwarePlatform/composable_kernel
into lwpck-977
parents
ce562aa6
f7331c60
Changes
107
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
106 additions
and
91 deletions
+106
-91
test/CMakeLists.txt
test/CMakeLists.txt
+58
-58
test/contraction/CMakeLists.txt
test/contraction/CMakeLists.txt
+9
-7
test/conv_tensor_rearrange/CMakeLists.txt
test/conv_tensor_rearrange/CMakeLists.txt
+1
-0
test/normalization/test_groupnorm_fp16.cpp
test/normalization/test_groupnorm_fp16.cpp
+10
-7
test/normalization/test_groupnorm_fp32.cpp
test/normalization/test_groupnorm_fp32.cpp
+10
-7
test/normalization/test_layernorm2d_fp16.cpp
test/normalization/test_layernorm2d_fp16.cpp
+9
-6
test/normalization/test_layernorm2d_fp32.cpp
test/normalization/test_layernorm2d_fp32.cpp
+9
-6
No files found.
test/CMakeLists.txt
View file @
de1afb7b
test/contraction/CMakeLists.txt
View file @
de1afb7b
add_gtest_executable
(
test_contraction test_contraction.cpp
)
target_link_libraries
(
test_contraction PRIVATE utility device_contraction_bilinear_instance device_contraction_scale_instance
)
list
(
APPEND gpu_list gfx908 gfx90a gfx940 gfx941 gfx942
)
set
(
target 0
)
foreach
(
gpu IN LISTS GPU_TARGETS
)
if
(
gpu IN_LIST gpu_list AND target EQUAL 0
)
if
((
DTYPES MATCHES
"fp32"
OR DTYPES MATCHES
"fp64"
)
OR NOT DEFINED DTYPES
)
add_gtest_executable
(
test_contraction test_contraction.cpp
)
target_link_libraries
(
test_contraction PRIVATE utility device_contraction_bilinear_instance device_contraction_scale_instance
)
add_gtest_executable
(
test_contraction_interface test_contraction_interface.cpp
)
target_link_libraries
(
test_contraction_interface PRIVATE utility device_contraction_bilinear_instance device_contraction_scale_instance
)
set
(
target 1
)
endif
()
endif
()
endforeach
()
test/conv_tensor_rearrange/CMakeLists.txt
View file @
de1afb7b
add_gtest_executable
(
test_conv_tensor_rearrange test_conv_tensor_rearrange.cpp
)
target_link_libraries
(
test_conv_tensor_rearrange PRIVATE utility device_image_to_column_instance device_column_to_image_instance
)
add_gtest_executable
(
test_conv_tensor_rearrange_interface test_conv_tensor_rearrange_interface.cpp
)
target_link_libraries
(
test_conv_tensor_rearrange_interface PRIVATE utility
)
test/normalization/test_groupnorm_fp16.cpp
View file @
de1afb7b
...
...
@@ -17,6 +17,7 @@ class TestGroupnorm : public ::testing::Test
using
BetaDataType
=
std
::
tuple_element_t
<
2
,
Tuple
>
;
using
ComputeDataType
=
std
::
tuple_element_t
<
3
,
Tuple
>
;
using
YDataType
=
std
::
tuple_element_t
<
4
,
Tuple
>
;
using
SaveMeanInvStdDataType
=
std
::
tuple_element_t
<
5
,
Tuple
>
;
void
Run
()
{
...
...
@@ -37,7 +38,9 @@ class TestGroupnorm : public ::testing::Test
GammaDataType
,
BetaDataType
,
ComputeDataType
,
YDataType
>
(
true
,
2
,
false
,
false
,
length
);
YDataType
,
SaveMeanInvStdDataType
,
true
>
(
true
,
2
,
false
,
false
,
length
);
EXPECT_TRUE
(
success
);
}
}
...
...
@@ -45,7 +48,7 @@ class TestGroupnorm : public ::testing::Test
using
KernelTypes
=
::
testing
::
Types
<
// XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType>
std
::
tuple
<
F16
,
F16
,
F16
,
F32
,
F16
>>
;
std
::
tuple
<
F16
,
F16
,
F16
,
F32
,
F16
,
F32
>>
;
TYPED_TEST_SUITE
(
TestGroupnorm
,
KernelTypes
);
TYPED_TEST
(
TestGroupnorm
,
Test_FP16
)
{
this
->
Run
();
}
test/normalization/test_groupnorm_fp32.cpp
View file @
de1afb7b
...
...
@@ -17,6 +17,7 @@ class TestGroupnorm : public ::testing::Test
using
BetaDataType
=
std
::
tuple_element_t
<
2
,
Tuple
>
;
using
ComputeDataType
=
std
::
tuple_element_t
<
3
,
Tuple
>
;
using
YDataType
=
std
::
tuple_element_t
<
4
,
Tuple
>
;
using
SaveMeanInvStdDataType
=
std
::
tuple_element_t
<
5
,
Tuple
>
;
void
Run
()
{
...
...
@@ -35,7 +36,9 @@ class TestGroupnorm : public ::testing::Test
GammaDataType
,
BetaDataType
,
ComputeDataType
,
YDataType
>
(
true
,
2
,
false
,
false
,
length
);
YDataType
,
SaveMeanInvStdDataType
,
true
>
(
true
,
2
,
false
,
false
,
length
);
EXPECT_TRUE
(
success
);
}
}
...
...
@@ -43,7 +46,7 @@ class TestGroupnorm : public ::testing::Test
using
KernelTypes
=
::
testing
::
Types
<
// XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType>
std
::
tuple
<
F32
,
F32
,
F32
,
F32
,
F32
>>
;
std
::
tuple
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
>>
;
TYPED_TEST_SUITE
(
TestGroupnorm
,
KernelTypes
);
TYPED_TEST
(
TestGroupnorm
,
Test_FP32
)
{
this
->
Run
();
}
test/normalization/test_layernorm2d_fp16.cpp
View file @
de1afb7b
...
...
@@ -17,6 +17,7 @@ class TestLayernorm2d : public ::testing::Test
using
BetaDataType
=
std
::
tuple_element_t
<
2
,
Tuple
>
;
using
ComputeDataType
=
std
::
tuple_element_t
<
3
,
Tuple
>
;
using
YDataType
=
std
::
tuple_element_t
<
4
,
Tuple
>
;
using
SaveMeanInvStdDataType
=
std
::
tuple_element_t
<
5
,
Tuple
>
;
void
Run
()
{
...
...
@@ -31,6 +32,8 @@ class TestLayernorm2d : public ::testing::Test
BetaDataType
,
ComputeDataType
,
YDataType
,
SaveMeanInvStdDataType
,
true
,
2
>
(
true
,
2
,
false
,
false
,
length
);
EXPECT_TRUE
(
success
);
}
...
...
@@ -39,7 +42,7 @@ class TestLayernorm2d : public ::testing::Test
using
KernelTypes
=
::
testing
::
Types
<
// XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType>
std
::
tuple
<
F16
,
F16
,
F16
,
F32
,
F16
>>
;
std
::
tuple
<
F16
,
F16
,
F16
,
F32
,
F16
,
F32
>>
;
TYPED_TEST_SUITE
(
TestLayernorm2d
,
KernelTypes
);
TYPED_TEST
(
TestLayernorm2d
,
Test_FP16
)
{
this
->
Run
();
}
test/normalization/test_layernorm2d_fp32.cpp
View file @
de1afb7b
...
...
@@ -17,6 +17,7 @@ class TestLayernorm2d : public ::testing::Test
using
BetaDataType
=
std
::
tuple_element_t
<
2
,
Tuple
>
;
using
ComputeDataType
=
std
::
tuple_element_t
<
3
,
Tuple
>
;
using
YDataType
=
std
::
tuple_element_t
<
4
,
Tuple
>
;
using
SaveMeanInvStdDataType
=
std
::
tuple_element_t
<
5
,
Tuple
>
;
void
Run
()
{
...
...
@@ -31,6 +32,8 @@ class TestLayernorm2d : public ::testing::Test
BetaDataType
,
ComputeDataType
,
YDataType
,
SaveMeanInvStdDataType
,
true
,
2
>
(
true
,
2
,
false
,
false
,
length
);
EXPECT_TRUE
(
success
);
}
...
...
@@ -39,7 +42,7 @@ class TestLayernorm2d : public ::testing::Test
using
KernelTypes
=
::
testing
::
Types
<
// XDataType, GammaDataType, BetaDataType, ComputeDataType, YDataType>
std
::
tuple
<
F32
,
F32
,
F32
,
F32
,
F32
>>
;
std
::
tuple
<
F32
,
F32
,
F32
,
F32
,
F32
,
F32
>>
;
TYPED_TEST_SUITE
(
TestLayernorm2d
,
KernelTypes
);
TYPED_TEST
(
TestLayernorm2d
,
Test_FP32
)
{
this
->
Run
();
}
Prev
1
2
3
4
5
6
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