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
346dcac3
Commit
346dcac3
authored
Aug 22, 2022
by
Paul
Browse files
Format
parent
e77a7947
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
test/include/basic_ops.hpp
test/include/basic_ops.hpp
+3
-2
test/simplify_algebra_test.cpp
test/simplify_algebra_test.cpp
+3
-3
No files found.
test/include/basic_ops.hpp
View file @
346dcac3
...
@@ -186,9 +186,10 @@ struct nop
...
@@ -186,9 +186,10 @@ struct nop
migraphx
::
shape
compute_shape
(
const
std
::
vector
<
migraphx
::
shape
>&
)
const
{
return
{};
}
migraphx
::
shape
compute_shape
(
const
std
::
vector
<
migraphx
::
shape
>&
)
const
{
return
{};
}
};
};
inline
migraphx
::
literal
get_2x2
(
int
base
=
0
)
inline
migraphx
::
literal
get_2x2
(
int
base
=
0
)
{
{
return
migraphx
::
literal
{{
migraphx
::
shape
::
float_type
,
{
2
,
2
}},
{
base
+
1
,
base
+
2
,
base
+
3
,
base
+
4
}};
return
migraphx
::
literal
{{
migraphx
::
shape
::
float_type
,
{
2
,
2
}},
{
base
+
1
,
base
+
2
,
base
+
3
,
base
+
4
}};
}
}
inline
migraphx
::
literal
get_2x2_transposed
()
inline
migraphx
::
literal
get_2x2_transposed
()
...
...
test/simplify_algebra_test.cpp
View file @
346dcac3
...
@@ -362,9 +362,9 @@ TEST_CASE(simplify_dot_add)
...
@@ -362,9 +362,9 @@ TEST_CASE(simplify_dot_add)
{
{
migraphx
::
module
m1
;
migraphx
::
module
m1
;
{
{
auto
x
=
m1
.
add_parameter
(
"x"
,
{
migraphx
::
shape
::
float_type
,
{
2
,
2
}});
auto
x
=
m1
.
add_parameter
(
"x"
,
{
migraphx
::
shape
::
float_type
,
{
2
,
2
}});
auto
one
=
m1
.
add_literal
(
get_2x2
());
auto
one
=
m1
.
add_literal
(
get_2x2
());
auto
two
=
m1
.
add_literal
(
get_2x2
(
1
));
auto
two
=
m1
.
add_literal
(
get_2x2
(
1
));
auto
sum
=
m1
.
add_instruction
(
migraphx
::
make_op
(
"add"
),
one
,
x
);
auto
sum
=
m1
.
add_instruction
(
migraphx
::
make_op
(
"add"
),
one
,
x
);
auto
dot
=
m1
.
add_instruction
(
migraphx
::
make_op
(
"dot"
),
sum
,
two
);
auto
dot
=
m1
.
add_instruction
(
migraphx
::
make_op
(
"dot"
),
sum
,
two
);
m1
.
add_instruction
(
pass_op
{},
dot
);
m1
.
add_instruction
(
pass_op
{},
dot
);
...
...
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