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
MIGraphX
Commits
e3d0c287
"git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "40595b78c4dc0acbb89f1d70f223baa9efa42a9f"
Commit
e3d0c287
authored
Jan 26, 2023
by
Alan Turner
Browse files
Formatting
parent
123c69b7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
src/targets/gpu/jit/ck_gemm_softmax_gemm.cpp
src/targets/gpu/jit/ck_gemm_softmax_gemm.cpp
+2
-3
tools/tune_models.py
tools/tune_models.py
+4
-2
No files found.
src/targets/gpu/jit/ck_gemm_softmax_gemm.cpp
View file @
e3d0c287
...
@@ -155,8 +155,7 @@ struct ck_gemm_softmax_gemm_compiler : compiler<ck_gemm_softmax_gemm_compiler>
...
@@ -155,8 +155,7 @@ struct ck_gemm_softmax_gemm_compiler : compiler<ck_gemm_softmax_gemm_compiler>
{
{
static
std
::
string
get_layout
(
const
shape
&
s
)
static
std
::
string
get_layout
(
const
shape
&
s
)
{
{
return
s
.
strides
().
back
()
==
1
return
s
.
strides
().
back
()
==
1
?
"ck::tensor_layout::gemm::RowMajor"
?
"ck::tensor_layout::gemm::RowMajor"
:
"ck::tensor_layout::gemm::ColumnMajor"
;
:
"ck::tensor_layout::gemm::ColumnMajor"
;
}
}
...
...
tools/tune_models.py
View file @
e3d0c287
...
@@ -40,9 +40,11 @@ def tune_models(models, batch_sizes, seq_len, n, existing):
...
@@ -40,9 +40,11 @@ def tune_models(models, batch_sizes, seq_len, n, existing):
json_file
=
"ck_tuning_{}.json"
.
format
(
time_stamp
)
json_file
=
"ck_tuning_{}.json"
.
format
(
time_stamp
)
for
model
in
models
:
for
model
in
models
:
for
batch
in
batch_sizes
:
for
batch
in
batch_sizes
:
params
=
"--input-dim @sample {} 4 64 64 @timestep 1 @encoder_hidden_states {} 64 1024 --fp16 "
.
format
(
batch
,
batch
)
params
=
"--input-dim @sample {} 4 64 64 @timestep 1 @encoder_hidden_states {} 64 1024 --fp16 "
.
format
(
batch
,
batch
)
if
"bert"
in
model
:
if
"bert"
in
model
:
params
=
"--fill1 input_ids --input-dim @input_ids {} {} "
.
format
(
batch
,
seq_len
)
params
=
"--fill1 input_ids --input-dim @input_ids {} {} "
.
format
(
batch
,
seq_len
)
out
=
subprocess
.
run
(
out
=
subprocess
.
run
(
'MIGRAPHX_LOG_CK_GEMM=1 ../build/bin/driver run {} -g {} | grep
\'
ck_gemm.*: \[{{
\'
| sort -u >> {}'
'MIGRAPHX_LOG_CK_GEMM=1 ../build/bin/driver run {} -g {} | grep
\'
ck_gemm.*: \[{{
\'
| sort -u >> {}'
.
format
(
model
,
params
,
log_file
),
.
format
(
model
,
params
,
log_file
),
...
...
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