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
244e313f
Commit
244e313f
authored
Oct 12, 2024
by
letaoqin
Browse files
tuning
parent
0435c336
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
example/66_gemm_bias_activation/gemm_bias_add_fp16.cpp
example/66_gemm_bias_activation/gemm_bias_add_fp16.cpp
+10
-10
example/66_gemm_bias_activation/gemm_bias_add_xdl_fp16.cpp
example/66_gemm_bias_activation/gemm_bias_add_xdl_fp16.cpp
+5
-4
No files found.
example/66_gemm_bias_activation/gemm_bias_add_fp16.cpp
View file @
244e313f
...
...
@@ -40,17 +40,17 @@ using DeviceOpInstance_64_16_16_64 = ck::tensor_operation::device::DeviceGemmMul
ALayout
,
BLayout
,
DsLayout
,
CLayout
,
ADataType
,
BDataType
,
DsDataType
,
CDataType
,
AccDataType
,
CShuffleDataType
,
AElementOp
,
BElementOp
,
CDEElementOp
,
GemmSpec
,
64
,
16
,
16
,
64
,
8
,
8
,
16
,
16
,
1
,
1
,
S
<
8
,
8
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
0
,
S
<
8
,
8
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
2
,
2
,
0
,
128
,
32
,
64
,
64
,
8
,
4
,
32
,
32
,
1
,
1
,
S
<
1
,
16
,
1
,
4
>
,
S
<
4
,
4
>
,
ck
::
BlockGemmPipelineScheduler
::
Interwave
,
ck
::
BlockGemmPipelineVersion
::
v1
,
F16
>
;
S
<
8
,
16
,
1
>
,
S
<
1
,
0
,
2
>
,
S
<
1
,
0
,
2
>
,
2
,
8
,
8
,
0
,
S
<
16
,
8
,
1
>
,
S
<
0
,
2
,
1
>
,
S
<
0
,
2
,
1
>
,
1
,
8
,
4
,
0
,
1
,
1
,
S
<
1
,
16
,
1
,
8
>
,
S
<
8
,
8
>
,
ck
::
BlockGemmPipelineScheduler
::
Interwave
,
ck
::
BlockGemmPipelineVersion
::
v2
,
F16
>
;
template
<
typename
ADataType
,
typename
BDataType
,
typename
DsDataType
,
typename
CDataType
,
typename
CDEElementOp
>
using
DeviceOpInstance_default
=
ck
::
tensor_operation
::
device
::
DeviceGemmMultiD_Xdl_CShuffle_V3
<
...
...
example/66_gemm_bias_activation/gemm_bias_add_xdl_fp16.cpp
View file @
244e313f
...
...
@@ -240,13 +240,14 @@ int main(int argc, char* argv[])
float
ave_time
=
0
;
if
(
op_type
==
0
)
gemm_bias_add_gelu_fp16
(
gemm_args
,
StreamConfig
{
nullptr
,
time_kernel
,
20
,
50
});
ave_time
=
gemm_bias_add_gelu_fp16
(
gemm_args
,
StreamConfig
{
nullptr
,
time_kernel
,
20
,
50
});
else
if
(
op_type
==
1
)
gemm_bias_add_relu_fp16
(
gemm_args
,
StreamConfig
{
nullptr
,
time_kernel
,
20
,
50
});
ave_time
=
gemm_bias_add_relu_fp16
(
gemm_args
,
StreamConfig
{
nullptr
,
time_kernel
,
20
,
50
});
else
if
(
op_type
==
2
)
gemm_bias_add_silu_fp16
(
gemm_args
,
StreamConfig
{
nullptr
,
time_kernel
,
20
,
50
});
ave_time
=
gemm_bias_add_silu_fp16
(
gemm_args
,
StreamConfig
{
nullptr
,
time_kernel
,
20
,
50
});
else
gemm_bias_add_sigmoid_fp16
(
gemm_args
,
StreamConfig
{
nullptr
,
time_kernel
,
20
,
50
});
ave_time
=
gemm_bias_add_sigmoid_fp16
(
gemm_args
,
StreamConfig
{
nullptr
,
time_kernel
,
20
,
50
});
// float ave_time = invoker.Run(argument, StreamConfig{nullptr, time_kernel, 20, 50});
std
::
size_t
flop
=
std
::
size_t
(
2
)
*
M
*
N
*
K
;
...
...
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