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
8c62c647
"official/vision/image_classification/resnet_runnable.py" did not exist on "e33fb9672a8d4519a04cf7b6ad4198777bfcf9c1"
Commit
8c62c647
authored
Feb 27, 2019
by
Shucai Xiao
Browse files
add gpu test example for the logsoftmax operator
parent
5f88d341
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
test/gpu/miopen.cpp
test/gpu/miopen.cpp
+36
-0
No files found.
test/gpu/miopen.cpp
View file @
8c62c647
...
...
@@ -2887,6 +2887,34 @@ struct test_lstm_bidirct_default_actv2
}
};
template
<
int
axis
>
struct
test_logsoftmax
{
migraphx
::
program
create_program
()
const
{
migraphx
::
program
p
;
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
3
,
4
,
5
,
6
}};
auto
param
=
p
.
add_parameter
(
"0"
,
s
);
p
.
add_instruction
(
migraphx
::
op
::
logsoftmax
{
axis
},
param
);
return
p
;
}
};
template
<
int
axis
>
struct
test_logsoftmax_1
{
migraphx
::
program
create_program
()
const
{
migraphx
::
program
p
;
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
3
}};
auto
param
=
p
.
add_parameter
(
"0"
,
s
);
p
.
add_instruction
(
migraphx
::
op
::
logsoftmax
{
axis
},
param
);
return
p
;
}
};
int
main
()
{
verify_program
<
test_relu_lrn
>
();
...
...
@@ -2999,4 +3027,12 @@ int main()
verify_program
<
test_lstm_bidirct_default_actv
>
();
verify_program
<
test_lstm_bidirct_default_actv1
>
();
verify_program
<
test_lstm_bidirct_default_actv2
>
();
verify_program
<
test_logsoftmax
<
0
>>
();
verify_program
<
test_logsoftmax
<
1
>>
();
verify_program
<
test_logsoftmax
<
2
>>
();
verify_program
<
test_logsoftmax
<
3
>>
();
verify_program
<
test_logsoftmax
<
4
>>
();
verify_program
<
test_logsoftmax_1
<
0
>>
();
verify_program
<
test_logsoftmax_1
<
1
>>
();
}
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