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
511c8d8f
Commit
511c8d8f
authored
Jun 25, 2019
by
Paul
Browse files
Merge from develop
parents
9b7c44ab
2a2c146c
Changes
62
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
31 deletions
+12
-31
test/op_shape_test.cpp
test/op_shape_test.cpp
+10
-31
test/tf/tf_test.cpp
test/tf/tf_test.cpp
+2
-0
No files found.
test/op_shape_test.cpp
View file @
511c8d8f
...
...
@@ -346,60 +346,39 @@ TEST_CASE(gather)
}
}
TEST_CASE
(
logsoftmax
)
template
<
class
T
>
void
test_softmax_variations
()
{
{
migraphx
::
shape
input
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}};
int
axis
=
0
;
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
migraphx
::
op
::
logsoftmax
{
axis
},
input
);
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
T
{
0
},
input
);
}
{
migraphx
::
shape
input
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}};
int
axis
=
1
;
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
migraphx
::
op
::
logsoftmax
{
axis
},
input
);
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
T
{
1
},
input
);
}
{
migraphx
::
shape
input
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}};
int
axis
=
2
;
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
migraphx
::
op
::
logsoftmax
{
axis
},
input
);
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
T
{
2
},
input
);
}
{
migraphx
::
shape
input
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}};
int
axis
=
3
;
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
migraphx
::
op
::
logsoftmax
{
axis
},
input
);
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
T
{
3
},
input
);
}
{
migraphx
::
shape
input
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}};
int
axis
=
4
;
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
migraphx
::
op
::
logsoftmax
{
axis
},
input
);
throws_shape
(
T
{
axis
},
input
);
}
}
{
migraphx
::
shape
input
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}};
int
axis
=
5
;
throws_shape
(
migraphx
::
op
::
logsoftmax
{
axis
},
input
);
}
TEST_CASE
(
softmax
)
{
test_softmax_variations
<
migraphx
::
op
::
softmax
>
();
}
{
migraphx
::
shape
input
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}};
int
axis
=
-
1
;
throws_shape
(
migraphx
::
op
::
logsoftmax
{
axis
},
input
);
}
}
TEST_CASE
(
logsoftmax
)
{
test_softmax_variations
<
migraphx
::
op
::
logsoftmax
>
();
}
// 2 inputs arguments
TEST_CASE
(
matmul
)
...
...
test/tf/tf_test.cpp
View file @
511c8d8f
...
...
@@ -124,6 +124,7 @@ TEST_CASE(conv_test)
migraphx
::
op
::
convolution
op
;
op
.
padding_mode
=
migraphx
::
op
::
padding_mode_t
::
same
;
op
.
padding
=
{
1
,
1
};
op
.
stride
=
{
1
,
1
};
op
.
dilation
=
{
1
,
1
};
auto
l2
=
p
.
add_instruction
(
migraphx
::
op
::
transpose
{{
3
,
2
,
0
,
1
}},
l1
);
...
...
@@ -145,6 +146,7 @@ TEST_CASE(depthwiseconv_test)
migraphx
::
op
::
convolution
op
;
op
.
padding_mode
=
migraphx
::
op
::
padding_mode_t
::
same
;
op
.
padding
=
{
1
,
1
};
op
.
stride
=
{
1
,
1
};
op
.
dilation
=
{
1
,
1
};
op
.
group
=
3
;
...
...
Prev
1
2
3
4
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