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
composable_kernel
Commits
a8232451
Commit
a8232451
authored
Dec 27, 2022
by
Anthony Chang
Browse files
post-rebase fix to accommodate check_err's new interface
parent
96f57e07
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
test/softmax/test_softmax_host_ref.cpp
test/softmax/test_softmax_host_ref.cpp
+4
-3
No files found.
test/softmax/test_softmax_host_ref.cpp
View file @
a8232451
...
...
@@ -28,7 +28,8 @@ TEST(ReferenceSoftmax, Run)
auto
ref_softmax_argument
=
ref_softmax
.
MakeArgument
(
x
,
y
,
alpha
,
beta
,
{
1
});
ref_softmax_invoker
.
Run
(
ref_softmax_argument
);
EXPECT_TRUE
((
utils
::
check_err
(
y
.
mData
,
{
0.73105858
,
0.268941421
,
0.26894142
,
0.73105858
})));
EXPECT_TRUE
((
utils
::
check_err
(
y
.
mData
,
std
::
vector
<
float
>
{
0.73105858
f
,
0.268941421
f
,
0.26894142
f
,
0.73105858
f
})));
}
TEST
(
ReferenceSoftmax
,
RunWithCalculatedStats
)
...
...
@@ -57,8 +58,8 @@ TEST(ReferenceSoftmax, RunWithCalculatedStats)
{
auto
ref_softmax_argument
=
ref_softmax
.
MakeArgument
(
x
,
y
,
alpha
,
beta
,
{
1
},
&
stats
);
ref_softmax_invoker
.
Run
(
ref_softmax_argument
);
EXPECT_TRUE
(
(
utils
::
check_err
(
stats
.
mData
,
{
1.74366838
,
1.74366838
,
1.74366838
,
1.74366838
})));
EXPECT_TRUE
(
(
utils
::
check_err
(
stats
.
mData
,
std
::
vector
<
float
>
{
1.74366838
f
,
1.74366838
f
,
1.74366838
f
,
1.74366838
f
})));
}
{
...
...
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