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
303fede0
Commit
303fede0
authored
May 02, 2019
by
Khalique
Browse files
change constructor
parent
38e604a2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
src/include/migraphx/op/clip.hpp
src/include/migraphx/op/clip.hpp
+6
-1
test/gpu/miopen.cpp
test/gpu/miopen.cpp
+1
-4
test/onnx/onnx_test.cpp
test/onnx/onnx_test.cpp
+1
-4
No files found.
src/include/migraphx/op/clip.hpp
View file @
303fede0
...
@@ -23,7 +23,12 @@ struct clip : unary<clip>
...
@@ -23,7 +23,12 @@ struct clip : unary<clip>
float
max_val
=
std
::
numeric_limits
<
float
>::
max
();
float
max_val
=
std
::
numeric_limits
<
float
>::
max
();
float
min_val
=
std
::
numeric_limits
<
float
>::
min
();
float
min_val
=
std
::
numeric_limits
<
float
>::
min
();
std
::
string
name
()
const
{
return
"clip"
;
}
clip
()
{
}
clip
(
float
max
,
float
min
)
:
max_val
(
max
),
min_val
(
min
)
{}
auto
apply
()
const
auto
apply
()
const
{
{
...
...
test/gpu/miopen.cpp
View file @
303fede0
...
@@ -1315,10 +1315,7 @@ struct test_clip : verify_program<test_clip>
...
@@ -1315,10 +1315,7 @@ struct test_clip : verify_program<test_clip>
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
x
=
p
.
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
}});
auto
x
=
p
.
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
}});
migraphx
::
op
::
clip
op
;
p
.
add_instruction
(
migraphx
::
op
::
clip
{
6.0
,
0.0
},
x
);
op
.
max_val
=
6.0
;
op
.
min_val
=
0.0
;
p
.
add_instruction
(
op
,
x
);
return
p
;
return
p
;
}
}
};
};
...
...
test/onnx/onnx_test.cpp
View file @
303fede0
...
@@ -798,10 +798,7 @@ TEST_CASE(clip_test)
...
@@ -798,10 +798,7 @@ TEST_CASE(clip_test)
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
l0
=
p
.
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
}});
auto
l0
=
p
.
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
3
}});
migraphx
::
op
::
clip
op
;
p
.
add_instruction
(
migraphx
::
op
::
clip
{
6.0
,
0.0
},
l0
);
op
.
max_val
=
6.0
;
op
.
min_val
=
0.0
;
p
.
add_instruction
(
op
,
l0
);
auto
prog
=
migraphx
::
parse_onnx
(
"clip_test.onnx"
);
auto
prog
=
migraphx
::
parse_onnx
(
"clip_test.onnx"
);
EXPECT
(
p
==
prog
);
EXPECT
(
p
==
prog
);
...
...
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