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
f050afb7
Commit
f050afb7
authored
Oct 17, 2022
by
Paul
Browse files
Use out own passthrough to workaround ck issues
parent
9c3073bd
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2631 deletions
+23
-2631
src/targets/gpu/jit/ck_gemm_instances.cpp
src/targets/gpu/jit/ck_gemm_instances.cpp
+8
-2628
src/targets/gpu/kernels/include/migraphx/kernels/ck.hpp
src/targets/gpu/kernels/include/migraphx/kernels/ck.hpp
+9
-0
tools/tune_ck.py
tools/tune_ck.py
+6
-3
No files found.
src/targets/gpu/jit/ck_gemm_instances.cpp
View file @
f050afb7
This diff is collapsed.
Click to expand it.
src/targets/gpu/kernels/include/migraphx/kernels/ck.hpp
View file @
f050afb7
...
@@ -82,5 +82,14 @@ struct ck_nop
...
@@ -82,5 +82,14 @@ struct ck_nop
}
}
};
};
struct
ck_passthrough
{
template
<
class
T
,
class
U
>
constexpr
void
operator
()(
T
&
y
,
U
x
)
const
{
y
=
x
;
}
};
}
// namespace migraphx
}
// namespace migraphx
#endif // MIGRAPHX_GUARD_KERNELS_CK_HPP
#endif // MIGRAPHX_GUARD_KERNELS_CK_HPP
tools/tune_ck.py
View file @
f050afb7
...
@@ -75,10 +75,10 @@ def parse_log(f):
...
@@ -75,10 +75,10 @@ def parse_log(f):
yield
config
yield
config
def
benchmark_log
(
f
):
def
benchmark_log
(
f
,
n
):
result
=
[]
result
=
[]
for
config
in
parse_log
(
f
):
for
config
in
parse_log
(
f
):
tuned
=
benchmark
(
config
,
13
)
tuned
=
benchmark
(
config
,
n
)
result
.
append
([
config
,
tuned
])
result
.
append
([
config
,
tuned
])
return
result
return
result
...
@@ -95,12 +95,15 @@ def parse_args():
...
@@ -95,12 +95,15 @@ def parse_args():
type
=
str
,
type
=
str
,
metavar
=
'file'
,
metavar
=
'file'
,
help
=
'Output json file to save tunings'
)
help
=
'Output json file to save tunings'
)
parser
.
add_argument
(
'-n'
,
type
=
int
,
help
=
'Number of instances to tune'
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
return
args
return
args
def
run
(
args
):
def
run
(
args
):
tuned
=
benchmark_log
(
args
.
log
)
tuned
=
benchmark_log
(
args
.
log
,
args
.
n
)
json
.
dump
(
tuned
,
open
(
args
.
out
,
'w+'
))
json
.
dump
(
tuned
,
open
(
args
.
out
,
'w+'
))
...
...
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