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
c9f49f32
Commit
c9f49f32
authored
May 30, 2023
by
Paul
Browse files
Only tune with exaustive tuning
parent
6f227761
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
src/targets/gpu/compile_ops.cpp
src/targets/gpu/compile_ops.cpp
+4
-2
src/targets/gpu/include/migraphx/gpu/compile_ops.hpp
src/targets/gpu/include/migraphx/gpu/compile_ops.hpp
+1
-0
src/targets/gpu/target.cpp
src/targets/gpu/target.cpp
+1
-1
No files found.
src/targets/gpu/compile_ops.cpp
View file @
c9f49f32
...
...
@@ -190,6 +190,7 @@ struct compile_manager
{
problem_cache
pc
;
std
::
vector
<
compile_plan
>
cps
;
bool
exhaustive
=
false
;
template
<
class
...
Ts
>
void
add_plan
(
Ts
&&
...
xs
)
...
...
@@ -199,6 +200,8 @@ struct compile_manager
void
update_configs
()
{
if
(
not
exhaustive
)
return
;
par_compile
(
cps
.
size
(),
[
&
](
auto
i
)
{
cps
[
i
].
update_config
();
});
}
...
...
@@ -230,8 +233,7 @@ struct compile_manager
void
compile_ops
::
apply
(
module
&
m
)
const
{
compile_manager
cm
;
problem_cache
pc
;
std
::
vector
<
compile_plan
>
cps
;
cm
.
exhaustive
=
exhaustive_tune
;
// Find all precompile opes
for
(
auto
ins
:
iterator_for
(
m
))
{
...
...
src/targets/gpu/include/migraphx/gpu/compile_ops.hpp
View file @
c9f49f32
...
...
@@ -39,6 +39,7 @@ struct context;
struct
compile_ops
{
context
*
ctx
=
nullptr
;
bool
exhaustive_tune
=
false
;
std
::
string
name
()
const
{
return
"gpu::compile_ops"
;
}
void
apply
(
module
&
m
)
const
;
};
...
...
src/targets/gpu/target.cpp
View file @
c9f49f32
...
...
@@ -154,7 +154,7 @@ std::vector<pass> target::get_passes(migraphx::context& gctx, const compile_opti
dead_code_elimination
{},
adjust_allocation
{
gpu_allocation_model
{}},
dead_code_elimination
{},
compile_ops
{
&
ctx
},
compile_ops
{
&
ctx
,
options
.
exhaustive_tune
},
dead_code_elimination
{},
promote_literals
{},
dead_code_elimination
{},
...
...
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