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
f9691e2e
Commit
f9691e2e
authored
Dec 13, 2023
by
Paul
Browse files
Format
parent
93c89587
Changes
489
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
23 additions
and
80 deletions
+23
-80
test/onnx/include/onnx_test.hpp
test/onnx/include/onnx_test.hpp
+0
-3
test/onnx/include/onnx_test_utils.hpp
test/onnx/include/onnx_test_utils.hpp
+23
-23
test/onnx/parse/acos_test.cpp
test/onnx/parse/acos_test.cpp
+0
-3
test/onnx/parse/acosh_test.cpp
test/onnx/parse/acosh_test.cpp
+0
-3
test/onnx/parse/add_bcast_test.cpp
test/onnx/parse/add_bcast_test.cpp
+0
-3
test/onnx/parse/add_fp16_test.cpp
test/onnx/parse/add_fp16_test.cpp
+0
-3
test/onnx/parse/add_scalar_test.cpp
test/onnx/parse/add_scalar_test.cpp
+0
-3
test/onnx/parse/argmax_dyn_test.cpp
test/onnx/parse/argmax_dyn_test.cpp
+0
-3
test/onnx/parse/argmax_select_last_index_test.cpp
test/onnx/parse/argmax_select_last_index_test.cpp
+0
-3
test/onnx/parse/argmax_test.cpp
test/onnx/parse/argmax_test.cpp
+0
-3
test/onnx/parse/argmin_select_last_index_test.cpp
test/onnx/parse/argmin_select_last_index_test.cpp
+0
-3
test/onnx/parse/argmin_test.cpp
test/onnx/parse/argmin_test.cpp
+0
-3
test/onnx/parse/asin_test.cpp
test/onnx/parse/asin_test.cpp
+0
-3
test/onnx/parse/asinh_test.cpp
test/onnx/parse/asinh_test.cpp
+0
-3
test/onnx/parse/atan_test.cpp
test/onnx/parse/atan_test.cpp
+0
-3
test/onnx/parse/atanh_test.cpp
test/onnx/parse/atanh_test.cpp
+0
-3
test/onnx/parse/averagepool_1d_test.cpp
test/onnx/parse/averagepool_1d_test.cpp
+0
-3
test/onnx/parse/averagepool_3d_test.cpp
test/onnx/parse/averagepool_3d_test.cpp
+0
-3
test/onnx/parse/averagepool_dilate_test.cpp
test/onnx/parse/averagepool_dilate_test.cpp
+0
-3
test/onnx/parse/averagepool_dyn_asym_padding_error_test.cpp
test/onnx/parse/averagepool_dyn_asym_padding_error_test.cpp
+0
-3
No files found.
test/onnx/include/onnx_test.hpp
View file @
f9691e2e
...
...
@@ -2,7 +2,6 @@
#ifndef MIGRAPHX_GUARD_TEST_ONNX_ONNX_TEST_HPP
#define MIGRAPHX_GUARD_TEST_ONNX_ONNX_TEST_HPP
#include <migraphx/program.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/instruction_ref.hpp>
...
...
@@ -16,7 +15,6 @@
#include <test.hpp>
inline
migraphx
::
program
optimize_onnx
(
const
std
::
string
&
name
,
bool
run_passes
=
false
)
{
migraphx
::
onnx_options
options
;
...
...
@@ -37,5 +35,4 @@ inline migraphx::program optimize_onnx(const std::string& name, bool run_passes
return
prog
;
}
#endif
test/onnx/include/onnx_test_utils.hpp
View file @
f9691e2e
...
...
@@ -2,7 +2,6 @@
#ifndef MIGRAPHX_GUARD_TEST_ONNX_ONNX_TEST_UTILS_HPP
#define MIGRAPHX_GUARD_TEST_ONNX_ONNX_TEST_UTILS_HPP
#include <migraphx/program.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/common.hpp>
...
...
@@ -90,13 +89,14 @@ inline migraphx::program create_external_data_prog()
return
p
;
}
inline
migraphx
::
program
make_group_norm
(
const
std
::
vector
<
int64_t
>&
input_dims
,
const
std
::
vector
<
int64_t
>&
scale_dims
,
const
std
::
vector
<
int64_t
>&
bias_dims
,
const
std
::
vector
<
int64_t
>&
reshape_dims
,
const
std
::
vector
<
int64_t
>&
reduce_axes
,
const
float
eps_value
=
1e-5
f
,
const
migraphx
::
shape
::
type_t
dtype
=
migraphx
::
shape
::
float_type
)
inline
migraphx
::
program
make_group_norm
(
const
std
::
vector
<
int64_t
>&
input_dims
,
const
std
::
vector
<
int64_t
>&
scale_dims
,
const
std
::
vector
<
int64_t
>&
bias_dims
,
const
std
::
vector
<
int64_t
>&
reshape_dims
,
const
std
::
vector
<
int64_t
>&
reduce_axes
,
const
float
eps_value
=
1e-5
f
,
const
migraphx
::
shape
::
type_t
dtype
=
migraphx
::
shape
::
float_type
)
{
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
...
...
@@ -129,13 +129,14 @@ inline migraphx::program make_group_norm(const std::vector<int64_t>& input_dims,
return
p
;
}
inline
migraphx
::
program
make_layer_norm
(
const
std
::
vector
<
int64_t
>&
input_shape
,
const
std
::
vector
<
int64_t
>&
scale_bias_shape
,
const
std
::
vector
<
int64_t
>&
reduce_axes
,
size_t
skipped_axis
,
bool
skip_bias
=
false
,
const
float
eps_value
=
1e-5
f
,
const
migraphx
::
shape
::
type_t
dtype
=
migraphx
::
shape
::
float_type
)
inline
migraphx
::
program
make_layer_norm
(
const
std
::
vector
<
int64_t
>&
input_shape
,
const
std
::
vector
<
int64_t
>&
scale_bias_shape
,
const
std
::
vector
<
int64_t
>&
reduce_axes
,
size_t
skipped_axis
,
bool
skip_bias
=
false
,
const
float
eps_value
=
1e-5
f
,
const
migraphx
::
shape
::
type_t
dtype
=
migraphx
::
shape
::
float_type
)
{
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
...
...
@@ -181,8 +182,8 @@ inline migraphx::program make_layer_norm(const std::vector<int64_t>& input_shape
}
inline
void
mvn_n_rank_test
(
std
::
vector
<
int64_t
>
axes
,
std
::
vector
<
size_t
>
input_shape
,
const
migraphx
::
program
&
prog
)
std
::
vector
<
size_t
>
input_shape
,
const
migraphx
::
program
&
prog
)
{
using
migraphx
::
make_op
;
...
...
@@ -209,11 +210,11 @@ inline void mvn_n_rank_test(std::vector<int64_t> axes,
}
inline
migraphx
::
instruction_ref
insert_quantizelinear_clip
(
migraphx
::
module
&
m
,
const
migraphx
::
instruction_ref
ins
,
const
migraphx
::
instruction_ref
round
,
const
migraphx
::
shape
s
,
const
int64_t
min_quant
,
const
int64_t
max_quant
)
const
migraphx
::
instruction_ref
ins
,
const
migraphx
::
instruction_ref
round
,
const
migraphx
::
shape
s
,
const
int64_t
min_quant
,
const
int64_t
max_quant
)
{
migraphx
::
instruction_ref
min_arg
;
migraphx
::
instruction_ref
max_arg
;
...
...
@@ -373,5 +374,4 @@ inline migraphx::program create_scatter_program(const std::string& scatter_mode,
return
p
;
}
#endif
test/onnx/parse/acos_test.cpp
View file @
f9691e2e
#include <onnx_test.hpp>
TEST_CASE
(
acos_test
)
{
migraphx
::
program
p
;
...
...
@@ -13,5 +12,3 @@ TEST_CASE(acos_test)
EXPECT
(
p
==
prog
);
}
test/onnx/parse/acosh_test.cpp
View file @
f9691e2e
#include <onnx_test.hpp>
TEST_CASE
(
acosh_test
)
{
migraphx
::
program
p
;
...
...
@@ -13,5 +12,3 @@ TEST_CASE(acosh_test)
EXPECT
(
p
==
prog
);
}
test/onnx/parse/add_bcast_test.cpp
View file @
f9691e2e
#include <onnx_test.hpp>
TEST_CASE
(
add_bcast_test
)
{
migraphx
::
program
p
;
...
...
@@ -16,5 +15,3 @@ TEST_CASE(add_bcast_test)
EXPECT
(
p
==
prog
);
}
test/onnx/parse/add_fp16_test.cpp
View file @
f9691e2e
#include <onnx_test.hpp>
TEST_CASE
(
add_fp16_test
)
{
migraphx
::
program
p
;
...
...
@@ -15,5 +14,3 @@ TEST_CASE(add_fp16_test)
EXPECT
(
p
==
prog
);
}
test/onnx/parse/add_scalar_test.cpp
View file @
f9691e2e
#include <onnx_test.hpp>
TEST_CASE
(
add_scalar_test
)
{
migraphx
::
program
p
;
...
...
@@ -16,5 +15,3 @@ TEST_CASE(add_scalar_test)
EXPECT
(
p
==
prog
);
}
test/onnx/parse/argmax_dyn_test.cpp
View file @
f9691e2e
#include <onnx_test.hpp>
TEST_CASE
(
argmax_dyn_test
)
{
migraphx
::
program
p
;
...
...
@@ -18,5 +17,3 @@ TEST_CASE(argmax_dyn_test)
EXPECT
(
p
==
prog
);
}
test/onnx/parse/argmax_select_last_index_test.cpp
View file @
f9691e2e
#include <onnx_test.hpp>
TEST_CASE
(
argmax_select_last_index_test
)
{
migraphx
::
program
p
;
...
...
@@ -14,5 +13,3 @@ TEST_CASE(argmax_select_last_index_test)
EXPECT
(
p
==
prog
);
}
test/onnx/parse/argmax_test.cpp
View file @
f9691e2e
#include <onnx_test.hpp>
TEST_CASE
(
argmax_test
)
{
migraphx
::
program
p
;
...
...
@@ -13,5 +12,3 @@ TEST_CASE(argmax_test)
EXPECT
(
p
==
prog
);
}
test/onnx/parse/argmin_select_last_index_test.cpp
View file @
f9691e2e
#include <onnx_test.hpp>
TEST_CASE
(
argmin_select_last_index_test
)
{
migraphx
::
program
p
;
...
...
@@ -14,5 +13,3 @@ TEST_CASE(argmin_select_last_index_test)
EXPECT
(
p
==
prog
);
}
test/onnx/parse/argmin_test.cpp
View file @
f9691e2e
#include <onnx_test.hpp>
TEST_CASE
(
argmin_test
)
{
migraphx
::
program
p
;
...
...
@@ -13,5 +12,3 @@ TEST_CASE(argmin_test)
EXPECT
(
p
==
prog
);
}
test/onnx/parse/asin_test.cpp
View file @
f9691e2e
#include <onnx_test.hpp>
TEST_CASE
(
asin_test
)
{
migraphx
::
program
p
;
...
...
@@ -13,5 +12,3 @@ TEST_CASE(asin_test)
EXPECT
(
p
==
prog
);
}
test/onnx/parse/asinh_test.cpp
View file @
f9691e2e
#include <onnx_test.hpp>
TEST_CASE
(
asinh_test
)
{
migraphx
::
program
p
;
...
...
@@ -13,5 +12,3 @@ TEST_CASE(asinh_test)
EXPECT
(
p
==
prog
);
}
test/onnx/parse/atan_test.cpp
View file @
f9691e2e
#include <onnx_test.hpp>
TEST_CASE
(
atan_test
)
{
migraphx
::
program
p
;
...
...
@@ -13,5 +12,3 @@ TEST_CASE(atan_test)
EXPECT
(
p
==
prog
);
}
test/onnx/parse/atanh_test.cpp
View file @
f9691e2e
#include <onnx_test.hpp>
TEST_CASE
(
atanh_test
)
{
migraphx
::
program
p
;
...
...
@@ -13,5 +12,3 @@ TEST_CASE(atanh_test)
EXPECT
(
p
==
prog
);
}
test/onnx/parse/averagepool_1d_test.cpp
View file @
f9691e2e
...
...
@@ -2,7 +2,6 @@
#include <onnx_test.hpp>
#include <migraphx/op/pooling.hpp>
TEST_CASE
(
averagepool_1d_test
)
{
migraphx
::
program
p
;
...
...
@@ -19,5 +18,3 @@ TEST_CASE(averagepool_1d_test)
auto
prog
=
optimize_onnx
(
"averagepool_1d_test.onnx"
);
EXPECT
(
p
==
prog
);
}
test/onnx/parse/averagepool_3d_test.cpp
View file @
f9691e2e
...
...
@@ -2,7 +2,6 @@
#include <onnx_test.hpp>
#include <migraphx/op/pooling.hpp>
TEST_CASE
(
averagepool_3d_test
)
{
migraphx
::
program
p
;
...
...
@@ -19,5 +18,3 @@ TEST_CASE(averagepool_3d_test)
auto
prog
=
optimize_onnx
(
"averagepool_3d_test.onnx"
);
EXPECT
(
p
==
prog
);
}
test/onnx/parse/averagepool_dilate_test.cpp
View file @
f9691e2e
...
...
@@ -2,7 +2,6 @@
#include <onnx_test.hpp>
#include <migraphx/op/pooling.hpp>
TEST_CASE
(
averagepool_dilate_test
)
{
migraphx
::
program
p
;
...
...
@@ -20,5 +19,3 @@ TEST_CASE(averagepool_dilate_test)
EXPECT
(
p
==
prog
);
}
test/onnx/parse/averagepool_dyn_asym_padding_error_test.cpp
View file @
f9691e2e
#include <onnx_test.hpp>
TEST_CASE
(
averagepool_dyn_asym_padding_error_test
)
{
migraphx
::
onnx_options
options
;
...
...
@@ -9,5 +8,3 @@ TEST_CASE(averagepool_dyn_asym_padding_error_test)
EXPECT
(
test
::
throws
(
[
&
]
{
migraphx
::
parse_onnx
(
"averagepool_dyn_asym_padding_error_test.onnx"
,
options
);
}));
}
Prev
1
2
3
4
5
…
25
Next
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