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
be08a05d
Unverified
Commit
be08a05d
authored
May 26, 2022
by
Paul Fultz II
Committed by
GitHub
May 26, 2022
Browse files
Merge branch 'develop' into jit-contiguous
parents
25fcef27
a401e72a
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
28 deletions
+24
-28
test/onnx/onnx_test.cpp
test/onnx/onnx_test.cpp
+0
-1
test/ref_rnn_ops_test.cpp
test/ref_rnn_ops_test.cpp
+23
-25
test/verify/run_verify.cpp
test/verify/run_verify.cpp
+1
-1
test/verify/test_conv_bias_clipped_relu.cpp
test/verify/test_conv_bias_clipped_relu.cpp
+0
-1
No files found.
test/onnx/onnx_test.cpp
View file @
be08a05d
...
...
@@ -3831,7 +3831,6 @@ TEST_CASE(reshape_non_standard_test)
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
op
::
reshape
op
;
std
::
vector
<
int64_t
>
reshape_dims
{
4
,
3
,
2
};
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
}};
auto
x
=
mm
->
add_parameter
(
"x"
,
s
);
auto
tran_x
=
...
...
test/ref_rnn_ops_test.cpp
100755 → 100644
View file @
be08a05d
...
...
@@ -1173,12 +1173,6 @@ TEST_CASE(gru_forward_args)
0.3852
,
-
0.1170
,
-
0.2937
,
0.2979
,
-
0.1357
,
0.4257
,
0.3884
,
-
0.2916
,
0.1071
,
0.0934
,
0.3645
,
-
0.4310
,
-
0.3480
,
0.0702
,
-
0.1558
};
migraphx
::
shape
b_shape
{
migraphx
::
shape
::
float_type
,
{
num_dirct
,
6
*
hidden_size
}};
std
::
vector
<
float
>
bias_data
{
0.0560
,
0.0310
,
-
0.1669
,
-
0.0781
,
0.1793
,
-
0.1758
,
0.3173
,
-
0.1650
,
-
0.3732
,
0.2946
,
-
0.0912
,
0.3118
,
0.1391
,
0.2755
,
0.2695
,
-
0.1059
,
-
0.2357
,
0.3629
,
-
0.2534
,
-
0.0494
,
0.0556
,
0.0881
,
-
0.2592
,
-
0.2213
,
0.2310
,
-
0.4044
,
0.1801
,
0.1438
,
0.3108
,
-
0.3607
};
migraphx
::
shape
in_shape
{
migraphx
::
shape
::
float_type
,
{
seq_len
,
batch_size
,
input_size
}};
std
::
vector
<
float
>
input
{
-
0.8432
,
-
0.9887
,
...
...
@@ -1199,9 +1193,6 @@ TEST_CASE(gru_forward_args)
-
1.0536
,
-
0.2529
};
migraphx
::
shape
ih_shape
{
migraphx
::
shape
::
float_type
,
{
num_dirct
,
batch_size
,
hidden_size
}};
std
::
vector
<
float
>
ih_data
{
-
0.0468
,
0.5691
,
-
0.0882
,
0.8340
,
0.1483
,
-
0.3902
,
-
0.5348
,
0.4178
,
1.0175
,
0.9212
};
float
clip
=
0.0
f
;
// 3 args
...
...
@@ -1242,6 +1233,11 @@ TEST_CASE(gru_forward_args)
// 4 args (bias is used)
{
std
::
vector
<
float
>
bias_data
{
0.0560
,
0.0310
,
-
0.1669
,
-
0.0781
,
0.1793
,
-
0.1758
,
0.3173
,
-
0.1650
,
-
0.3732
,
0.2946
,
-
0.0912
,
0.3118
,
0.1391
,
0.2755
,
0.2695
,
-
0.1059
,
-
0.2357
,
0.3629
,
-
0.2534
,
-
0.0494
,
0.0556
,
0.0881
,
-
0.2592
,
-
0.2213
,
0.2310
,
-
0.4044
,
0.1801
,
0.1438
,
0.3108
,
-
0.3607
};
migraphx
::
shape
b_shape
{
migraphx
::
shape
::
float_type
,
{
num_dirct
,
6
*
hidden_size
}};
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
seq
=
mm
->
add_literal
(
migraphx
::
literal
{
in_shape
,
input
});
...
...
@@ -1280,6 +1276,9 @@ TEST_CASE(gru_forward_args)
// 4 args (ih is used)
{
std
::
vector
<
float
>
ih_data
{
-
0.0468
,
0.5691
,
-
0.0882
,
0.8340
,
0.1483
,
-
0.3902
,
-
0.5348
,
0.4178
,
1.0175
,
0.9212
};
migraphx
::
shape
ih_shape
{
migraphx
::
shape
::
float_type
,
{
num_dirct
,
batch_size
,
hidden_size
}};
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
seq
=
mm
->
add_literal
(
migraphx
::
literal
{
in_shape
,
input
});
...
...
@@ -2210,15 +2209,6 @@ TEST_CASE(gru_bidirectional_args)
0.4101
,
0.2641
,
-
0.4110
,
-
0.1681
,
0.3582
,
-
0.2089
,
0.0852
,
0.0963
,
0.3866
,
0.1955
,
-
0.2174
,
0.1996
,
-
0.2252
,
0.1748
,
0.1833
,
-
0.3155
,
0.2567
,
-
0.4387
,
0.3402
,
0.0599
};
migraphx
::
shape
b_shape
{
migraphx
::
shape
::
float_type
,
{
num_dirct
,
6
*
hidden_size
}};
std
::
vector
<
float
>
bias_data
{
-
0.1582
,
-
0.0826
,
0.4008
,
0.0118
,
0.2511
,
0.1900
,
-
0.2838
,
0.2549
,
-
0.2484
,
0.2363
,
-
0.4083
,
-
0.0295
,
-
0.1161
,
0.1211
,
0.2509
,
-
0.1414
,
-
0.2628
,
-
0.2992
,
0.1517
,
0.1817
,
-
0.2783
,
0.3183
,
-
0.1629
,
-
0.3108
,
-
0.3418
,
0.0411
,
0.2203
,
0.2187
,
-
0.2990
,
-
0.0416
,
0.0209
,
-
0.1024
,
0.4443
,
-
0.4420
,
-
0.0330
,
-
0.3591
,
-
0.2990
,
0.2167
,
0.1395
,
0.2317
,
0.1318
,
0.1909
,
-
0.3615
,
0.1953
,
-
0.2582
,
-
0.2217
,
0.3723
,
0.1458
,
0.2630
,
-
0.0377
,
0.1754
,
0.0800
,
-
0.3964
,
-
0.3247
,
0.4219
,
-
0.0900
,
0.3553
,
0.2614
,
-
0.1298
,
-
0.1124
};
migraphx
::
shape
in_shape
{
migraphx
::
shape
::
float_type
,
{
seq_len
,
batch_size
,
input_size
}};
std
::
vector
<
float
>
input
{
-
0.8432
,
-
0.9887
,
...
...
@@ -2239,11 +2229,6 @@ TEST_CASE(gru_bidirectional_args)
-
1.0536
,
-
0.2529
};
migraphx
::
shape
ih_shape
{
migraphx
::
shape
::
float_type
,
{
num_dirct
,
batch_size
,
hidden_size
}};
std
::
vector
<
float
>
ih_data
{
-
0.0468
,
0.5691
,
-
0.0882
,
0.8340
,
0.1483
,
-
0.3902
,
-
0.5348
,
0.4178
,
1.0175
,
0.9212
,
-
0.0468
,
0.5691
,
-
0.0882
,
0.8340
,
0.1483
,
-
0.3902
,
-
0.5348
,
0.4178
,
1.0175
,
0.9212
};
float
clip
=
0.0
f
;
// 3 args
...
...
@@ -2288,6 +2273,15 @@ TEST_CASE(gru_bidirectional_args)
// 4 args (bias is used)
{
std
::
vector
<
float
>
bias_data
{
-
0.1582
,
-
0.0826
,
0.4008
,
0.0118
,
0.2511
,
0.1900
,
-
0.2838
,
0.2549
,
-
0.2484
,
0.2363
,
-
0.4083
,
-
0.0295
,
-
0.1161
,
0.1211
,
0.2509
,
-
0.1414
,
-
0.2628
,
-
0.2992
,
0.1517
,
0.1817
,
-
0.2783
,
0.3183
,
-
0.1629
,
-
0.3108
,
-
0.3418
,
0.0411
,
0.2203
,
0.2187
,
-
0.2990
,
-
0.0416
,
0.0209
,
-
0.1024
,
0.4443
,
-
0.4420
,
-
0.0330
,
-
0.3591
,
-
0.2990
,
0.2167
,
0.1395
,
0.2317
,
0.1318
,
0.1909
,
-
0.3615
,
0.1953
,
-
0.2582
,
-
0.2217
,
0.3723
,
0.1458
,
0.2630
,
-
0.0377
,
0.1754
,
0.0800
,
-
0.3964
,
-
0.3247
,
0.4219
,
-
0.0900
,
0.3553
,
0.2614
,
-
0.1298
,
-
0.1124
};
migraphx
::
shape
b_shape
{
migraphx
::
shape
::
float_type
,
{
num_dirct
,
6
*
hidden_size
}};
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
seq
=
mm
->
add_literal
(
migraphx
::
literal
{
in_shape
,
input
});
...
...
@@ -2330,6 +2324,10 @@ TEST_CASE(gru_bidirectional_args)
// 4 args (ih is used)
{
std
::
vector
<
float
>
ih_data
{
-
0.0468
,
0.5691
,
-
0.0882
,
0.8340
,
0.1483
,
-
0.3902
,
-
0.5348
,
0.4178
,
1.0175
,
0.9212
,
-
0.0468
,
0.5691
,
-
0.0882
,
0.8340
,
0.1483
,
-
0.3902
,
-
0.5348
,
0.4178
,
1.0175
,
0.9212
};
migraphx
::
shape
ih_shape
{
migraphx
::
shape
::
float_type
,
{
num_dirct
,
batch_size
,
hidden_size
}};
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
seq
=
mm
->
add_literal
(
migraphx
::
literal
{
in_shape
,
input
});
...
...
@@ -4186,7 +4184,6 @@ TEST_CASE(lstm_bidirectional_var_seq_lens)
-
0.83699064
,
0.49162736
,
-
0.8271
,
-
0.5683
,
0.4562
,
-
1.2545
,
1.2729
,
-
0.4082
,
-
0.4392
,
-
0.9406
,
0.7794
,
1.8194
,
-
0.5811
,
0.2166
};
std
::
vector
<
int
>
sl_data
{
1
,
2
,
3
};
float
clip
=
0.0
f
;
migraphx
::
shape
in_shape
{
migraphx
::
shape
::
float_type
,
{
seq_len
,
batch_size
,
input_size
}};
...
...
@@ -4196,10 +4193,11 @@ TEST_CASE(lstm_bidirectional_var_seq_lens)
migraphx
::
shape
ih_shape
{
migraphx
::
shape
::
float_type
,
{
num_dirct
,
batch_size
,
hidden_size
}};
migraphx
::
shape
ic_shape
{
migraphx
::
shape
::
float_type
,
{
num_dirct
,
batch_size
,
hidden_size
}};
migraphx
::
shape
pph_shape
{
migraphx
::
shape
::
float_type
,
{
num_dirct
,
3
*
hidden_size
}};
migraphx
::
shape
sl_shape
{
migraphx
::
shape
::
int32_type
,
{
batch_size
}};
// concatenation of hidden states as program output
{
std
::
vector
<
int
>
sl_data
{
1
,
2
,
3
};
migraphx
::
shape
sl_shape
{
migraphx
::
shape
::
int32_type
,
{
batch_size
}};
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
seq
=
mm
->
add_literal
(
migraphx
::
literal
{
in_shape
,
input_data
});
...
...
test/verify/run_verify.cpp
View file @
be08a05d
...
...
@@ -129,7 +129,6 @@ void run_verify::verify(const std::string& name, const migraphx::program& p) con
auto_print
::
set_terminate_handler
(
name
);
if
(
migraphx
::
enabled
(
MIGRAPHX_DUMP_TEST
{}))
migraphx
::
save
(
p
,
name
+
".mxr"
);
std
::
vector
<
std
::
pair
<
std
::
string
,
result_future
>>
results
;
std
::
vector
<
std
::
string
>
target_names
;
for
(
const
auto
&
tname
:
migraphx
::
get_targets
())
{
...
...
@@ -145,6 +144,7 @@ void run_verify::verify(const std::string& name, const migraphx::program& p) con
}
if
(
not
target_names
.
empty
())
{
std
::
vector
<
std
::
pair
<
std
::
string
,
result_future
>>
results
;
migraphx
::
parameter_map
m
;
for
(
auto
&&
x
:
p
.
get_parameter_shapes
())
{
...
...
test/verify/test_conv_bias_clipped_relu.cpp
View file @
be08a05d
...
...
@@ -12,7 +12,6 @@ struct test_conv_bias_clipped_relu : verify_program<test_conv_bias_clipped_relu>
{
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
std
::
vector
<
size_t
>
input_lens
{
4
,
3
,
3
,
3
};
auto
input
=
mm
->
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
4
,
3
,
3
,
3
}});
auto
weights
=
...
...
Prev
1
2
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