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
5c2a9f2e
Commit
5c2a9f2e
authored
May 26, 2023
by
Paul
Browse files
Generate configs
parent
059fa4cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
src/targets/gpu/compile_ops.cpp
src/targets/gpu/compile_ops.cpp
+2
-0
src/targets/gpu/jit/ck_gemm.cpp
src/targets/gpu/jit/ck_gemm.cpp
+11
-0
No files found.
src/targets/gpu/compile_ops.cpp
View file @
5c2a9f2e
...
@@ -110,6 +110,8 @@ struct compile_plan
...
@@ -110,6 +110,8 @@ struct compile_plan
}
}
const
compiled_result
&
benchmark
()
const
const
compiled_result
&
benchmark
()
const
{
{
if
(
results
.
empty
())
MIGRAPHX_THROW
(
"No configs to tune"
);
if
(
results
.
size
()
==
1
)
if
(
results
.
size
()
==
1
)
return
results
.
front
();
return
results
.
front
();
std
::
cout
<<
"Benchmarking "
<<
preop
.
name
()
<<
": "
<<
results
.
size
()
<<
" configs"
std
::
cout
<<
"Benchmarking "
<<
preop
.
name
()
<<
": "
<<
results
.
size
()
<<
" configs"
...
...
src/targets/gpu/jit/ck_gemm.cpp
View file @
5c2a9f2e
...
@@ -411,6 +411,17 @@ struct ck_gemm_compiler : compiler<ck_gemm_compiler>
...
@@ -411,6 +411,17 @@ struct ck_gemm_compiler : compiler<ck_gemm_compiler>
m
.
replace_instruction
(
ins2
,
code_object
,
ins2
->
inputs
());
m
.
replace_instruction
(
ins2
,
code_object
,
ins2
->
inputs
());
}};
}};
}
}
optional
<
tuning_config
>
get_tuning_config
(
context
&
ctx
,
instruction_ref
ins
,
const
operation
&
op
)
const
{
tuning_config
tc
;
auto
shapes
=
to_shapes
(
ins
->
inputs
());
auto
problem
=
create_problem
(
shapes
,
create_settings
(
ins
,
op
));
auto
solutions
=
problem
.
GetSolutions
(
ctx
.
get_current_device
().
get_gfx_name
());
tc
.
solutions
.
resize
(
solutions
.
size
());
std
::
iota
(
tc
.
solutions
.
begin
(),
tc
.
solutions
.
end
(),
0
);
return
tc
;
}
};
};
}
// namespace gpu
}
// namespace gpu
...
...
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