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
480cc884
"git@developer.sourcefind.cn:gaoqiong/composable_kernel.git" did not exist on "2d05b1bb7875d50593710ae7f7fddad442c3cd75"
Commit
480cc884
authored
Mar 03, 2022
by
ltqin
Browse files
change input parameter
parent
84e76a16
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
19 deletions
+20
-19
example/14_conv2d_backward_weight_xdl/README.md
example/14_conv2d_backward_weight_xdl/README.md
+9
-9
example/14_conv2d_backward_weight_xdl/main.cpp
example/14_conv2d_backward_weight_xdl/main.cpp
+11
-10
No files found.
example/14_conv2d_backward_weight_xdl/README.md
View file @
480cc884
...
@@ -40,19 +40,19 @@ cmake \
...
@@ -40,19 +40,19 @@ cmake \
#arg3: run kernel # of times (>1)
#arg3: run kernel # of times (>1)
#arg4: is show log (0=no, 1=yes)
#arg4: is show log (0=no, 1=yes)
#arg5 to 19: N, K, C, Y, X, Hi, Wi, Sy, Sx, Dy, Dx, LeftPy, LeftPx, RightPy, RightPx, split-k
#arg5 to 19: N, K, C, Y, X, Hi, Wi, Sy, Sx, Dy, Dx, LeftPy, LeftPx, RightPy, RightPx, split-k
./example/conv2d_fwd_xdl 0 1 5
1
./example/conv2d_fwd_xdl 0 1 5
0 4
```
```
Result
Result
```
```
in_n_c_hi_wi: dim 4, lengths {128, 1
28, 71, 71
}, strides {
645248, 1, 9088, 128
}
in_n_c_hi_wi: dim 4, lengths {128, 1
024, 14, 14
}, strides {
200704, 1, 14336, 1024
}
wei_k_c_y_x: dim 4, lengths {256, 1
28
, 3, 3}, strides {
1152
, 1, 3
84, 128
}
wei_k_c_y_x: dim 4, lengths {256, 1
024
, 3, 3}, strides {
9216
, 1, 3
072, 1024
}
out_n_k_ho_wo: dim 4, lengths {128, 256,
3
6,
3
6}, strides {
33177
6, 1,
921
6, 256}
out_n_k_ho_wo: dim 4, lengths {128, 256, 6, 6}, strides {
921
6, 1,
153
6, 256}
arg.a_grid_desc_kbatch_k0_m_k1_{
1, 20736, 256
}
arg.a_grid_desc_kbatch_k0_m_k1_{
4, 144, 256, 8
}
arg.b_grid_desc_kbatch_k0_n_k1_{
1, 20736, 1152
}
arg.b_grid_desc_kbatch_k0_n_k1_{
4, 144, 9216, 8
}
arg.c_grid_desc_m_n_{ 256,
1152
}
arg.c_grid_desc_m_n_{ 256,
9216
}
launch_and_time_kernel: grid_dim {
18
, 1, 1}, block_dim {256, 1, 1}
launch_and_time_kernel: grid_dim {
576
, 1, 1}, block_dim {256, 1, 1}
Warm up
Warm up
Start running 5 times...
Start running 5 times...
Perf:
12.0997 ms, 8.08653
TFlops,
20.7201
GB/s
Perf:
0.401084 ms, 54.2112
TFlops,
145.75
GB/s
```
```
example/14_conv2d_backward_weight_xdl/main.cpp
View file @
480cc884
...
@@ -79,24 +79,24 @@ int main(int argc, char* argv[])
...
@@ -79,24 +79,24 @@ int main(int argc, char* argv[])
int
init_method
=
0
;
int
init_method
=
0
;
int
nrepeat
=
5
;
int
nrepeat
=
5
;
int
do_log
=
0
;
int
do_log
=
0
;
int
split_k
=
1
;
int
split_k
=
4
;
// Conv shape
// Conv shape
ck
::
index_t
N
=
128
;
ck
::
index_t
N
=
128
;
ck
::
index_t
K
=
256
;
ck
::
index_t
K
=
256
;
ck
::
index_t
C
=
1
28
;
ck
::
index_t
C
=
1
024
;
ck
::
index_t
Y
=
3
;
ck
::
index_t
Y
=
3
;
ck
::
index_t
X
=
3
;
ck
::
index_t
X
=
3
;
ck
::
index_t
Hi
=
7
1
;
ck
::
index_t
Hi
=
1
4
;
ck
::
index_t
Wi
=
7
1
;
ck
::
index_t
Wi
=
1
4
;
ck
::
index_t
conv_stride_h
=
2
;
ck
::
index_t
conv_stride_h
=
2
;
ck
::
index_t
conv_stride_w
=
2
;
ck
::
index_t
conv_stride_w
=
2
;
ck
::
index_t
conv_dilation_h
=
1
;
ck
::
index_t
conv_dilation_h
=
1
;
ck
::
index_t
conv_dilation_w
=
1
;
ck
::
index_t
conv_dilation_w
=
1
;
ck
::
index_t
in_left_pad_h
=
1
;
ck
::
index_t
in_left_pad_h
=
0
;
ck
::
index_t
in_left_pad_w
=
1
;
ck
::
index_t
in_left_pad_w
=
0
;
ck
::
index_t
in_right_pad_h
=
1
;
ck
::
index_t
in_right_pad_h
=
0
;
ck
::
index_t
in_right_pad_w
=
1
;
ck
::
index_t
in_right_pad_w
=
0
;
if
(
argc
==
6
)
if
(
argc
==
6
)
{
{
...
@@ -136,8 +136,9 @@ int main(int argc, char* argv[])
...
@@ -136,8 +136,9 @@ int main(int argc, char* argv[])
printf
(
"arg2: initialization (0=no init, 1=integer value, 2=decimal value)
\n
"
);
printf
(
"arg2: initialization (0=no init, 1=integer value, 2=decimal value)
\n
"
);
printf
(
"arg3: run kernel # of times (>1)
\n
"
);
printf
(
"arg3: run kernel # of times (>1)
\n
"
);
printf
(
"arg4: is show log (0=no, 1=yes)
\n
"
);
printf
(
"arg4: is show log (0=no, 1=yes)
\n
"
);
printf
(
"arg5 to 19: N, K, C, Y, X, Hi, Wi, Sy, Sx, Dy, Dx, LeftPy, LeftPx, RightPy, "
printf
(
"arg5: split-k
\n
"
);
"RightPx, split-k
\n
"
);
printf
(
"arg6 to 19: N, K, C, Y, X, Hi, Wi, Sy, Sx, Dy, Dx, LeftPy, LeftPx, RightPy, "
"RightPx
\n
"
);
exit
(
0
);
exit
(
0
);
}
}
...
...
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