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
f0c512bc
Commit
f0c512bc
authored
Jul 06, 2018
by
Paul
Browse files
Formatting
parent
a9e5d73c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
16 deletions
+4
-16
src/program.cpp
src/program.cpp
+1
-1
src/targets/cpu/cpu_target.cpp
src/targets/cpu/cpu_target.cpp
+2
-11
test/eval_test.cpp
test/eval_test.cpp
+1
-4
No files found.
src/program.cpp
View file @
f0c512bc
...
@@ -111,7 +111,7 @@ void program::compile(const target& t)
...
@@ -111,7 +111,7 @@ void program::compile(const target& t)
{
{
assert
(
this
->
validate
()
!=
impl
->
instructions
.
end
());
assert
(
this
->
validate
()
!=
impl
->
instructions
.
end
());
this
->
impl
->
ctx
=
t
.
get_context
();
this
->
impl
->
ctx
=
t
.
get_context
();
for
(
auto
&&
p
:
t
.
get_passes
(
this
->
impl
->
ctx
))
for
(
auto
&&
p
:
t
.
get_passes
(
this
->
impl
->
ctx
))
{
{
p
.
apply
(
*
this
);
p
.
apply
(
*
this
);
#ifndef NDEBUG
#ifndef NDEBUG
...
...
src/targets/cpu/cpu_target.cpp
View file @
f0c512bc
...
@@ -542,21 +542,12 @@ struct cpu_pass
...
@@ -542,21 +542,12 @@ struct cpu_pass
{
{
std
::
string
name
()
const
{
return
"cpu::pass"
;
}
std
::
string
name
()
const
{
return
"cpu::pass"
;
}
void
apply
(
program
&
p
)
const
void
apply
(
program
&
p
)
const
{
cpu_apply
{
&
p
}.
apply
();
}
{
cpu_apply
{
&
p
}.
apply
();
}
};
};
std
::
string
cpu_target
::
name
()
const
{
return
"cpu"
;
}
std
::
string
cpu_target
::
name
()
const
{
return
"cpu"
;
}
std
::
vector
<
pass
>
cpu_target
::
get_passes
(
context
&
)
const
std
::
vector
<
pass
>
cpu_target
::
get_passes
(
context
&
)
const
{
return
{
cpu_pass
{}};
}
{
return
{
cpu_pass
{}
};
}
}
// namespace cpu
}
// namespace cpu
...
...
test/eval_test.cpp
View file @
f0c512bc
...
@@ -68,10 +68,7 @@ struct minus_op
...
@@ -68,10 +68,7 @@ struct minus_op
struct
id_target
struct
id_target
{
{
std
::
string
name
()
const
{
return
"id"
;
}
std
::
string
name
()
const
{
return
"id"
;
}
std
::
vector
<
migraph
::
pass
>
get_passes
(
migraph
::
context
&
)
const
std
::
vector
<
migraph
::
pass
>
get_passes
(
migraph
::
context
&
)
const
{
return
{};
}
{
return
{};
}
migraph
::
context
get_context
()
const
{
return
{};
}
migraph
::
context
get_context
()
const
{
return
{};
}
};
};
...
...
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