Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
a9872038
Commit
a9872038
authored
Nov 15, 2023
by
Paul
Browse files
Fix kernel name
parent
22c92a19
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
src/targets/gpu/compile_gen.cpp
src/targets/gpu/compile_gen.cpp
+3
-1
src/targets/gpu/include/migraphx/gpu/compile_gen.hpp
src/targets/gpu/include/migraphx/gpu/compile_gen.hpp
+1
-1
src/targets/gpu/jit/pointwise.cpp
src/targets/gpu/jit/pointwise.cpp
+1
-1
No files found.
src/targets/gpu/compile_gen.cpp
View file @
a9872038
...
...
@@ -346,9 +346,11 @@ static std::vector<std::string> get_op_names(const module& m)
return
result
;
}
std
::
string
generate_name_from_ops
(
const
module
&
m
)
std
::
string
generate_name_from_ops
(
const
module
&
m
,
const
std
::
string
&
postname
)
{
auto
op_names
=
get_op_names
(
m
);
if
(
not
postname
.
empty
())
op_names
.
push_back
(
postname
);
return
join_strings
(
op_names
,
"_"
);
}
...
...
src/targets/gpu/include/migraphx/gpu/compile_gen.hpp
View file @
a9872038
...
...
@@ -76,7 +76,7 @@ std::string generate_pointwise(const module& pm, const std::string& name);
std
::
string
generate_reduce
(
const
module
&
m
,
const
std
::
string
&
name
);
std
::
string
generate_name_from_ops
(
const
module
&
m
);
std
::
string
generate_name_from_ops
(
const
module
&
m
,
const
std
::
string
&
postname
=
""
);
struct
reduce_op
{
...
...
src/targets/gpu/jit/pointwise.cpp
View file @
a9872038
...
...
@@ -104,7 +104,7 @@ struct pointwise_compiler : compiler<pointwise_compiler>
auto
*
pm
=
ins
->
module_inputs
().
front
();
auto
pf
=
generate_pointwise
(
*
pm
,
"inner_pointwise"
);
std
::
string
lambda
=
"MIGRAPHX_LIFT(inner_pointwise)"
;
auto
kernel_name
=
generate_name_from_ops
(
*
pm
)
+
"
_
kernel"
;
auto
kernel_name
=
generate_name_from_ops
(
*
pm
,
"kernel"
)
;
return
compile_op
(
ctx
,
to_shapes
(
ins
->
inputs
()),
{{
"lambda"
,
lambda
},
{
"preamble"
,
pf
},
{
"kernel"
,
kernel_name
}});
...
...
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