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
03c25255
"models/vscode:/vscode.git/clone" did not exist on "747f42d0e907e22a95241aecab41f68718422848"
Commit
03c25255
authored
Jun 25, 2024
by
Harisankar Sadasivan
Browse files
corrected arg parsing for streamk and universal streamk
parent
f7f9954d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
2 deletions
+52
-2
example/01_gemm/common.hpp
example/01_gemm/common.hpp
+52
-2
No files found.
example/01_gemm/common.hpp
View file @
03c25255
...
...
@@ -136,6 +136,57 @@ bool parse_cmd_args<ProblemSize>(int argc,
return
true
;
}
template
<
>
bool
parse_cmd_args
<
ProblemSizeStreamK_universal
>
(
int
argc
,
char
*
argv
[],
ProblemSizeStreamK
&
problem_size
,
ExecutionConfig
&
config
)
{
if
(
argc
==
1
)
{
// use default case
}
else
if
(
argc
==
4
)
{
config
.
do_verification
=
std
::
stoi
(
argv
[
1
]);
config
.
init_method
=
std
::
stoi
(
argv
[
2
]);
config
.
time_kernel
=
std
::
stoi
(
argv
[
3
]);
}
else
if
(
argc
>=
10
)
{
config
.
do_verification
=
std
::
stoi
(
argv
[
1
]);
config
.
init_method
=
std
::
stoi
(
argv
[
2
]);
config
.
time_kernel
=
std
::
stoi
(
argv
[
3
]);
problem_size
.
M
=
std
::
stoi
(
argv
[
4
]);
problem_size
.
N
=
std
::
stoi
(
argv
[
5
]);
problem_size
.
K
=
std
::
stoi
(
argv
[
6
]);
problem_size
.
StrideA
=
std
::
stoi
(
argv
[
7
]);
problem_size
.
StrideB
=
std
::
stoi
(
argv
[
8
]);
problem_size
.
StrideC
=
std
::
stoi
(
argv
[
9
]);
if
(
argc
>=
11
)
{
problem_size
.
Streamk_sel
=
std
::
stoi
(
argv
[
10
]);
problem_size
.
Grid_size
=
std
::
stoi
(
argv
[
11
]);
}
}
else
{
std
::
cerr
<<
"arg1: verification (0=no, 1=yes)"
<<
std
::
endl
<<
"arg2: initialization (0=no init, 1=integer value, 2=decimal value)"
<<
std
::
endl
<<
"arg3: time kernel (0=no, 1=yes)"
<<
std
::
endl
<<
"arg4 to 9: M (256x), N(128x), K(32x), StrideA, StrideB, StrideC"
<<
std
::
endl
<<
"arg10: stream-k select (0: all DP, 1: 1-tile SK, 2: 2-tile SK)"
<<
"
\n
arg11: Grid_size(-1 for max occupancy)"
<<
std
::
endl
;
return
false
;
}
return
true
;
}
template
<
>
bool
parse_cmd_args
<
ProblemSizeStreamK
>
(
int
argc
,
char
*
argv
[],
...
...
@@ -168,8 +219,7 @@ bool parse_cmd_args<ProblemSizeStreamK>(int argc,
if
(
argc
>=
11
)
{
problem_size
.
Streamk_sel
=
std
::
stoi
(
argv
[
10
]);
problem_size
.
Grid_size
=
std
::
stoi
(
argv
[
11
]);
problem_size
.
NumSKBlocks
=
std
::
stoi
(
argv
[
10
]);
}
}
else
...
...
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