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
75f3a868
Commit
75f3a868
authored
Jun 04, 2018
by
Paul
Browse files
Fix warnings and tidy checks
parent
263579c2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
7 deletions
+8
-7
CMakeLists.txt
CMakeLists.txt
+2
-0
src/include/rtg/manage_ptr.hpp
src/include/rtg/manage_ptr.hpp
+1
-1
src/targets/cpu/cpu_target.cpp
src/targets/cpu/cpu_target.cpp
+0
-2
src/targets/miopen/miopen_target.cpp
src/targets/miopen/miopen_target.cpp
+3
-3
test/miopen.cpp
test/miopen.cpp
+2
-1
No files found.
CMakeLists.txt
View file @
75f3a868
...
@@ -53,6 +53,8 @@ rocm_enable_clang_tidy(
...
@@ -53,6 +53,8 @@ rocm_enable_clang_tidy(
-hicpp-no-array-decay
-hicpp-no-array-decay
-hicpp-special-member-functions
-hicpp-special-member-functions
-hicpp-use-override
-hicpp-use-override
# This check is broken
-hicpp-use-auto
-llvm-header-guard
-llvm-header-guard
-llvm-include-order
-llvm-include-order
-misc-macro-parentheses
-misc-macro-parentheses
...
...
src/include/rtg/manage_ptr.hpp
View file @
75f3a868
...
@@ -27,7 +27,7 @@ struct null_deleter
...
@@ -27,7 +27,7 @@ struct null_deleter
}
}
};
};
template
<
class
T
,
class
F
,
F
f
>
template
<
class
T
,
class
F
,
F
f
>
// NOLINT
using
manage_ptr
=
std
::
unique_ptr
<
T
,
manage_deleter
<
F
,
f
>>
;
using
manage_ptr
=
std
::
unique_ptr
<
T
,
manage_deleter
<
F
,
f
>>
;
template
<
class
T
>
template
<
class
T
>
...
...
src/targets/cpu/cpu_target.cpp
View file @
75f3a868
...
@@ -17,8 +17,6 @@ struct cpu_convolution
...
@@ -17,8 +17,6 @@ struct cpu_convolution
{
{
argument
result
{
output_shape
};
argument
result
{
output_shape
};
visit_all
(
result
,
args
[
0
],
args
[
1
])([
&
](
auto
output
,
auto
input
,
auto
weights
)
{
visit_all
(
result
,
args
[
0
],
args
[
1
])([
&
](
auto
output
,
auto
input
,
auto
weights
)
{
auto
in_n
=
input
.
get_shape
().
lens
()[
0
];
auto
in_c
=
input
.
get_shape
().
lens
()[
1
];
auto
in_h
=
input
.
get_shape
().
lens
()[
2
];
auto
in_h
=
input
.
get_shape
().
lens
()[
2
];
auto
in_w
=
input
.
get_shape
().
lens
()[
3
];
auto
in_w
=
input
.
get_shape
().
lens
()[
3
];
...
...
src/targets/miopen/miopen_target.cpp
View file @
75f3a868
...
@@ -33,7 +33,7 @@ struct hip_free
...
@@ -33,7 +33,7 @@ struct hip_free
check_shapes
{
inputs
}.
has
(
1
);
check_shapes
{
inputs
}.
has
(
1
);
return
{};
return
{};
}
}
argument
compute
(
shape
output_shape
,
std
::
vector
<
argument
>
args
)
const
argument
compute
(
shape
,
std
::
vector
<
argument
>
args
)
const
{
{
// TODO: Check return status
// TODO: Check return status
hipFree
(
args
.
front
().
data
());
hipFree
(
args
.
front
().
data
());
...
@@ -176,8 +176,8 @@ struct miopen_relu
...
@@ -176,8 +176,8 @@ struct miopen_relu
struct
miopen_apply
struct
miopen_apply
{
{
program
*
prog
;
program
*
prog
=
nullptr
;
instruction_ref
handle
;
instruction_ref
handle
{}
;
void
apply
()
void
apply
()
{
{
...
...
test/miopen.cpp
View file @
75f3a868
...
@@ -116,8 +116,9 @@ void test1()
...
@@ -116,8 +116,9 @@ void test1()
{
{
auto
x
=
cpu
();
auto
x
=
cpu
();
auto
y
=
gpu
();
auto
y
=
gpu
();
// TODO: Use expect
if
(
x
==
y
)
if
(
x
==
y
)
printf
(
"FAILED
\n
"
)
;
std
::
cout
<<
"FAILED"
<<
std
::
endl
;
}
}
int
main
()
{
test1
();
}
int
main
()
{
test1
();
}
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