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
44de83e1
Commit
44de83e1
authored
Jul 23, 2022
by
Ted Themistokleous
Browse files
fixup! Add test to verify compute with @divzero asserts correclty
parent
0b5cdb01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
test/ref_ops_test.cpp
test/ref_ops_test.cpp
+1
-6
No files found.
test/ref_ops_test.cpp
View file @
44de83e1
...
@@ -1422,13 +1422,8 @@ TEST_CASE(div_zero_compute_shape_fails)
...
@@ -1422,13 +1422,8 @@ TEST_CASE(div_zero_compute_shape_fails)
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
auto
zero
=
mm
->
add_literal
(
0.0
f
);
auto
zero
=
mm
->
add_literal
(
0.0
f
);
auto
two
=
mm
->
add_literal
(
2.0
f
);
auto
x
=
mm
->
add_parameter
(
"x"
,
{
migraphx
::
shape
::
float_type
,
{
1
}});
auto
x
=
mm
->
add_parameter
(
"x"
,
{
migraphx
::
shape
::
float_type
,
{
1
}});
auto
y
=
mm
->
add_parameter
(
"y"
,
{
migraphx
::
shape
::
float_type
,
{
1
}});
auto
div0
=
mm
->
add_divzero
({
x
,
zero
},
{
migraphx
::
shape
::
float_type
,
{
1
}});
auto
div0
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"div"
),
x
,
zero
);
auto
mul
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"mul"
),
two
,
div0
);
auto
add
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
y
,
mul
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"sub"
),
y
,
add
);
run_pass
(
*
mm
);
run_pass
(
*
mm
);
...
...
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