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
c67ae342
Commit
c67ae342
authored
May 15, 2023
by
Adam Osewski
Browse files
Remove old test.
parent
8f2b2d76
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
73 deletions
+1
-73
test/grouped_gemm/CMakeLists.txt
test/grouped_gemm/CMakeLists.txt
+1
-4
test/grouped_gemm/grouped_gemm_fp16.cpp
test/grouped_gemm/grouped_gemm_fp16.cpp
+0
-69
No files found.
test/grouped_gemm/CMakeLists.txt
View file @
c67ae342
add_custom_target
(
test_grouped_gemm
)
add_test_executable
(
test_grouped_gemm_fp16 grouped_gemm_fp16.cpp
)
add_gtest_executable
(
test_grouped_gemm_splitk test_grouped_gemm_splitk.cpp
)
target_link_libraries
(
test_grouped_gemm_fp16 PRIVATE utility device_grouped_gemm_instance
)
target_link_libraries
(
test_grouped_gemm_splitk PRIVATE utility device_grouped_gemm_instance
)
add_dependencies
(
test_grouped_gemm
test_grouped_gemm_fp16
test_grouped_gemm_splitk
)
add_dependencies
(
test_grouped_gemm test_grouped_gemm_splitk
)
test/grouped_gemm/grouped_gemm_fp16.cpp
deleted
100644 → 0
View file @
8f2b2d76
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2022, Advanced Micro Devices, Inc. All rights reserved.
#include <iostream>
#include <random>
#include "profiler/profile_grouped_gemm_impl.hpp"
namespace
{
using
ADataType
=
ck
::
half_t
;
using
BDataType
=
ck
::
half_t
;
using
CDataType
=
ck
::
half_t
;
using
AccDataType
=
float
;
using
Row
=
ck
::
tensor_layout
::
gemm
::
RowMajor
;
using
Col
=
ck
::
tensor_layout
::
gemm
::
ColumnMajor
;
template
<
typename
ALayout
,
typename
BLayout
,
typename
CLayout
>
bool
TestGroupedGemm
()
{
std
::
mt19937
gen
(
19391
);
std
::
uniform_int_distribution
<>
distrib
(
1
,
10
);
int
group_count
=
distrib
(
gen
);
// GEMM shape
std
::
vector
<
ck
::
tensor_operation
::
device
::
GemmDesc
>
gemm_descs
;
std
::
vector
<
const
void
*>
p_a
,
p_b
;
std
::
vector
<
void
*>
p_c
;
std
::
vector
<
int
>
Ms
,
Ns
,
Ks
,
StrideAs
,
StrideBs
,
StrideCs
;
for
(
int
i
=
0
;
i
<
group_count
;
i
++
)
{
Ms
.
push_back
(
256
+
256
*
distrib
(
gen
));
Ns
.
push_back
(
256
+
256
*
distrib
(
gen
));
Ks
.
push_back
(
128
+
128
*
distrib
(
gen
));
StrideAs
.
push_back
(
std
::
is_same
<
Row
,
ALayout
>::
value
?
Ks
[
i
]
:
Ms
[
i
]);
StrideBs
.
push_back
(
std
::
is_same
<
Row
,
BLayout
>::
value
?
Ns
[
i
]
:
Ks
[
i
]);
StrideCs
.
push_back
(
std
::
is_same
<
Row
,
CLayout
>::
value
?
Ns
[
i
]
:
Ms
[
i
]);
}
return
ck
::
profiler
::
profile_grouped_gemm_impl
<
ADataType
,
BDataType
,
CDataType
,
AccDataType
,
ALayout
,
BLayout
,
CLayout
>
(
true
,
1
,
false
,
1
,
Ms
,
Ns
,
Ks
,
StrideAs
,
StrideBs
,
StrideCs
);
}
}
// anonymous namespace
int
main
()
{
bool
res
=
true
;
res
=
res
&&
TestGroupedGemm
<
Row
,
Row
,
Row
>
();
res
=
res
&&
TestGroupedGemm
<
Row
,
Col
,
Row
>
();
res
=
res
&&
TestGroupedGemm
<
Col
,
Row
,
Row
>
();
res
=
res
&&
TestGroupedGemm
<
Col
,
Col
,
Row
>
();
std
::
cout
<<
"TestGroupedGemm ..... "
<<
(
res
?
"SUCCESS"
:
"FAILURE"
)
<<
std
::
endl
;
return
res
?
0
:
1
;
}
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