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
026e48a3
Commit
026e48a3
authored
Sep 20, 2018
by
mei-ye
Browse files
remove write_literal and add env to disable mem color for eliminate_allocation_test.cpp
parent
5a335544
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
12 deletions
+3
-12
src/include/migraph/operators.hpp
src/include/migraph/operators.hpp
+0
-12
src/opt/memory_coloring_impl.cpp
src/opt/memory_coloring_impl.cpp
+2
-0
test/eliminate_allocation_test.cpp
test/eliminate_allocation_test.cpp
+1
-0
No files found.
src/include/migraph/operators.hpp
View file @
026e48a3
...
...
@@ -550,18 +550,6 @@ struct load
}
};
struct
write_literal
{
std
::
size_t
offset
=
0
;
bool
pre_copy
=
false
;
std
::
string
name
()
const
{
return
"write_literal"
;
}
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
{
return
inputs
.
at
(
1
);
}
argument
compute
(
context
&
,
const
shape
&
,
const
std
::
vector
<
argument
>&
)
const
{
MIGRAPH_THROW
(
"not computable"
);
}
};
struct
outline
{
shape
s
;
...
...
src/opt/memory_coloring_impl.cpp
View file @
026e48a3
...
...
@@ -234,10 +234,12 @@ void memory_coloring_impl::rewrite()
}
else
if
(
is_literal
(
ins
))
{
#if 0
auto pre = p_program->add_literal(ins->lit);
bool pre_copy = (interval->get_begin() < earliest_end_point);
p_program->replace_instruction(
ins, write_literal{offset, pre_copy}, scratch_param, pre);
#endif
}
}
}
...
...
test/eliminate_allocation_test.cpp
View file @
026e48a3
...
...
@@ -102,6 +102,7 @@ void float_aligned()
int
main
()
{
setenv
(
"MIGRAPH_DISABLE_MEMORY_COLORING"
,
"1"
,
1
);
basic
();
aligned
();
unaligned
();
...
...
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