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
ea0b8059
Commit
ea0b8059
authored
Oct 19, 2023
by
Umang Yadav
Browse files
revert changes for module.cpp
parent
f16d29dc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
src/module.cpp
src/module.cpp
+6
-11
No files found.
src/module.cpp
View file @
ea0b8059
...
...
@@ -114,7 +114,7 @@ struct module_impl
const
operation
&
get_operation
(
instruction_ref
ins
)
{
return
ins
->
get_operator
();
}
module
::
module
(
const
std
::
string
&
name
)
:
impl
(
std
::
make_unique
<
module_impl
>
())
module
::
module
(
const
std
::
string
&
name
)
:
impl
(
std
::
make_unique
<
module_impl
>
())
{
impl
->
name
=
name
;
}
...
...
@@ -800,10 +800,8 @@ static std::string cpp_var_name(const std::string& name)
{
std
::
string
prefix
=
"x_"
;
if
(
not
contains
(
name
,
"@"
))
{
return
to_c_id
(
name
);
}
return
to_c_id
(
prefix
+
name
);
prefix
=
"p_"
;
return
to_c_id
(
prefix
+
replace_string
(
name
,
":"
,
"_module_"
));
}
static
void
print_py_op
(
std
::
ostream
&
os
,
const
operation
&
op
)
...
...
@@ -827,11 +825,8 @@ static void print_make_op(std::ostream& os, const operation& op)
auto
v
=
op
.
to_value
();
if
(
not
v
.
empty
())
{
os
<<
"migraphx::make_op("
<<
enclose_name
(
op
.
name
());
auto
rname
=
"{"
+
replace_string
(
to_json_string
(
v
),
"
\"
"
,
"
\\\"
"
)
+
"}"
;
rname
=
replace_string
(
rname
,
":"
,
", "
);
rname
=
replace_string
(
rname
,
"
\\
"
,
""
);
os
<<
", "
<<
rname
;
os
<<
"migraphx::make_json_op("
<<
enclose_name
(
op
.
name
());
os
<<
", "
<<
enclose_name
(
to_json_string
(
v
));
}
else
{
...
...
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