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
d3496ac6
"tests/experimental/vscode:/vscode.git/clone" did not exist on "7bdb9a7f6b27a5c1f58427f2afd66f8c815d7e75"
Commit
d3496ac6
authored
Oct 20, 2023
by
Umang Yadav
Browse files
Revert printning changes
parent
fa12da23
Changes
1
Hide 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 @
d3496ac6
...
...
@@ -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
;
}
...
...
@@ -165,7 +165,7 @@ void module::assign(const module& m)
auto
order
=
any_cast
<
builtin
::
param
>
(
ins
->
get_operator
()).
order
;
auto
s
=
ins
->
get_shape
();
copy_ins
=
impl
->
insert
(
impl
->
instructions
.
end
(),
{
builtin
::
param
{
name
,
order
},
std
::
move
(
s
),
{}});
{
builtin
::
param
{
name
,
order
},
std
::
move
(
s
),
{}});
impl
->
nparams
++
;
}
else
if
(
ins
->
name
()
==
"@outline"
)
...
...
@@ -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