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
6b44f839
Commit
6b44f839
authored
May 17, 2018
by
Paul
Browse files
Formatting
parent
11dfd0df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
15 deletions
+7
-15
include/rtg/operators.hpp
include/rtg/operators.hpp
+2
-8
include/rtg/streamutils.hpp
include/rtg/streamutils.hpp
+4
-5
test/eval_test.cpp
test/eval_test.cpp
+1
-2
No files found.
include/rtg/operators.hpp
View file @
6b44f839
...
...
@@ -18,10 +18,7 @@ struct convolution
std
::
array
<
std
::
size_t
,
2
>
padding
=
{{
0
,
0
}};
std
::
array
<
std
::
size_t
,
2
>
stride
=
{{
1
,
1
}};
std
::
array
<
std
::
size_t
,
2
>
dilation
=
{{
1
,
1
}};
std
::
string
name
()
const
{
return
"convolution"
;
}
std
::
string
name
()
const
{
return
"convolution"
;
}
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
{
if
(
inputs
.
size
()
!=
2
)
...
...
@@ -74,10 +71,7 @@ struct pooling
std
::
array
<
std
::
size_t
,
2
>
padding
=
{{
0
,
0
}};
std
::
array
<
std
::
size_t
,
2
>
stride
=
{{
1
,
1
}};
std
::
array
<
std
::
size_t
,
2
>
lengths
=
{{
1
,
1
}};
std
::
string
name
()
const
{
return
"pooling"
;
}
std
::
string
name
()
const
{
return
"pooling"
;
}
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
{
if
(
inputs
.
empty
())
...
...
include/rtg/streamutils.hpp
View file @
6b44f839
...
...
@@ -6,13 +6,11 @@
namespace
rtg
{
template
<
class
T
>
template
<
class
T
>
struct
stream_range_container
{
const
T
*
r
;
stream_range_container
(
const
T
&
x
)
:
r
(
&
x
)
{}
stream_range_container
(
const
T
&
x
)
:
r
(
&
x
)
{}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
stream_range_container
&
sr
)
{
...
...
@@ -20,7 +18,8 @@ struct stream_range_container
if
(
!
sr
.
r
->
empty
())
{
os
<<
sr
.
r
->
front
();
std
::
for_each
(
std
::
next
(
sr
.
r
->
begin
()),
sr
.
r
->
end
(),
[
&
](
auto
&&
x
)
{
os
<<
", "
<<
x
;
});
std
::
for_each
(
std
::
next
(
sr
.
r
->
begin
()),
sr
.
r
->
end
(),
[
&
](
auto
&&
x
)
{
os
<<
", "
<<
x
;
});
}
return
os
;
}
...
...
test/eval_test.cpp
View file @
6b44f839
...
...
@@ -99,7 +99,7 @@ void print_test()
{
rtg
::
program
p
;
auto
x
=
p
.
add_parameter
(
"x"
,
{
rtg
::
shape
::
int64_type
});
auto
x
=
p
.
add_parameter
(
"x"
,
{
rtg
::
shape
::
int64_type
});
auto
two
=
p
.
add_literal
(
2
);
p
.
add_instruction
(
sum_op
{},
x
,
two
);
...
...
@@ -154,7 +154,6 @@ void insert_replace_test()
EXPECT
(
result
!=
rtg
::
literal
{
5
});
}
void
target_test
()
{
rtg
::
program
p
;
...
...
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