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
91586757
Commit
91586757
authored
Apr 17, 2019
by
Shucai Xiao
Browse files
merge changes from the adjust_allocation pass
parents
20190861
08818a51
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
src/targets/gpu/CMakeLists.txt
src/targets/gpu/CMakeLists.txt
+1
-0
src/targets/gpu/adjust_allocation.cpp
src/targets/gpu/adjust_allocation.cpp
+11
-0
No files found.
src/targets/gpu/CMakeLists.txt
View file @
91586757
...
...
@@ -68,6 +68,7 @@ add_library(migraphx_gpu
gather.cpp
lrn.cpp
schedule_model.cpp
adjust_allocation.cpp
)
set_target_properties
(
migraphx_gpu PROPERTIES EXPORT_NAME gpu
)
rocm_clang_tidy_check
(
migraphx_gpu
)
...
...
src/targets/gpu/adjust_allocation.cpp
View file @
91586757
...
...
@@ -2,6 +2,10 @@
#include <migraphx/instruction.hpp>
#include <migraphx/program.hpp>
#include <migraphx/iterator_for.hpp>
<<<<<<<
HEAD
=======
#include <algorithm>
>>>>>>>
adjust_gpu_allocation
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
...
...
@@ -9,8 +13,15 @@ namespace gpu {
void
adjust_allocation
::
apply
(
program
&
p
)
const
{
std
::
vector
<
std
::
string
>
ins_names
=
{
"gpu::fp_conversion"
};
for
(
auto
ins
:
iterator_for
(
p
))
{
// skip instructions not in the set
if
(
std
::
find
(
ins_names
.
begin
(),
ins_names
.
end
(),
ins
->
name
())
==
ins_names
.
end
())
{
continue
;
}
auto
alias_ins
=
instruction
::
get_output_alias
(
ins
,
true
);
if
(
alias_ins
->
name
()
==
"hip::allocate"
)
{
...
...
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