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
24859b63
Commit
24859b63
authored
Sep 27, 2018
by
Paul
Browse files
Fix asan bug in contiguous
parent
b705a976
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/include/migraph/literal.hpp
src/include/migraph/literal.hpp
+1
-1
test/cpu_ops_test.cpp
test/cpu_ops_test.cpp
+1
-1
No files found.
src/include/migraph/literal.hpp
View file @
24859b63
...
@@ -87,8 +87,8 @@ struct literal : raw_data<literal>
...
@@ -87,8 +87,8 @@ struct literal : raw_data<literal>
m_shape
.
visit_type
([
&
](
auto
as
)
{
m_shape
.
visit_type
([
&
](
auto
as
)
{
auto
output
=
make_view
(
m_shape
,
as
.
from
(
buffer
.
get
()));
auto
output
=
make_view
(
m_shape
,
as
.
from
(
buffer
.
get
()));
shape_for_each
(
output
.
get_shape
(),
[
&
](
const
auto
&
idx
)
{
shape_for_each
(
output
.
get_shape
(),
[
&
](
const
auto
&
idx
)
{
it
++
;
output
(
idx
.
begin
(),
idx
.
end
())
=
*
it
;
output
(
idx
.
begin
(),
idx
.
end
())
=
*
it
;
it
++
;
});
});
});
});
}
}
...
...
test/cpu_ops_test.cpp
View file @
24859b63
...
@@ -795,7 +795,7 @@ void contiguous_test()
...
@@ -795,7 +795,7 @@ void contiguous_test()
result
.
visit
([
&
](
auto
output
)
{
results_vector
.
assign
(
output
.
begin
(),
output
.
end
());
});
result
.
visit
([
&
](
auto
output
)
{
results_vector
.
assign
(
output
.
begin
(),
output
.
end
());
});
std
::
vector
<
size_t
>
new_lens
=
{
1
,
3
,
2
,
2
};
std
::
vector
<
size_t
>
new_lens
=
{
1
,
3
,
2
,
2
};
std
::
vector
<
size_t
>
new_strides
=
{
12
,
1
,
6
,
3
};
std
::
vector
<
size_t
>
new_strides
=
{
12
,
1
,
6
,
3
};
std
::
vector
<
float
>
gold
=
{
1
,
4
,
7
,
10
,
2
,
5
,
8
,
11
,
3
,
6
,
9
,
0
};
std
::
vector
<
float
>
gold
=
{
0
,
3
,
6
,
9
,
1
,
4
,
7
,
10
,
2
,
5
,
8
,
11
};
EXPECT
(
migraph
::
verify_range
(
results_vector
,
gold
));
EXPECT
(
migraph
::
verify_range
(
results_vector
,
gold
));
}
}
...
...
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