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
e1ef1e17
Commit
e1ef1e17
authored
Nov 05, 2018
by
Shucai Xiao
Browse files
Added inline namespace for all .hpp and .cpp file.
parent
1cdb49a6
Changes
134
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
34 additions
and
16 deletions
+34
-16
src/targets/gpu/include/migraph/gpu/relu.hpp
src/targets/gpu/include/migraph/gpu/relu.hpp
+3
-2
src/targets/gpu/include/migraph/gpu/rocblas.hpp
src/targets/gpu/include/migraph/gpu/rocblas.hpp
+3
-2
src/targets/gpu/include/migraph/gpu/softmax.hpp
src/targets/gpu/include/migraph/gpu/softmax.hpp
+3
-2
src/targets/gpu/include/migraph/gpu/target.hpp
src/targets/gpu/include/migraph/gpu/target.hpp
+4
-1
src/targets/gpu/include/migraph/gpu/write_literals.hpp
src/targets/gpu/include/migraph/gpu/write_literals.hpp
+2
-2
src/targets/gpu/leaky_relu.cpp
src/targets/gpu/leaky_relu.cpp
+2
-1
src/targets/gpu/lowering.cpp
src/targets/gpu/lowering.cpp
+2
-0
src/targets/gpu/mul.cpp
src/targets/gpu/mul.cpp
+2
-1
src/targets/gpu/pooling.cpp
src/targets/gpu/pooling.cpp
+2
-1
src/targets/gpu/relu.cpp
src/targets/gpu/relu.cpp
+2
-1
src/targets/gpu/rocblas.cpp
src/targets/gpu/rocblas.cpp
+2
-1
src/targets/gpu/softmax.cpp
src/targets/gpu/softmax.cpp
+2
-1
src/targets/gpu/target.cpp
src/targets/gpu/target.cpp
+2
-0
src/targets/gpu/write_literals.cpp
src/targets/gpu/write_literals.cpp
+3
-1
No files found.
src/targets/gpu/include/migraph/gpu/relu.hpp
View file @
e1ef1e17
...
...
@@ -7,6 +7,7 @@
#include <migraph/operators.hpp>
#include <migraph/generate.hpp>
#include <migraph/shape_for_each.hpp>
#include <migraph/config.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraph/gpu/hip.hpp>
#include <migraph/dfor.hpp>
...
...
@@ -17,7 +18,7 @@
#include <migraph/gpu/context.hpp>
#include <utility>
namespace
migraph
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
struct
miopen_relu
...
...
@@ -31,7 +32,7 @@ struct miopen_relu
};
}
// namespace gpu
}
// inline namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/targets/gpu/include/migraph/gpu/rocblas.hpp
View file @
e1ef1e17
...
...
@@ -3,9 +3,10 @@
#include <migraph/manage_ptr.hpp>
#include <migraph/operators.hpp>
#include <migraph/config.hpp>
#include <rocblas.h>
namespace
migraph
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
using
rocblas_handle_ptr
=
MIGRAPH_MANAGE_PTR
(
rocblas_handle
,
rocblas_destroy_handle
);
...
...
@@ -14,7 +15,7 @@ rocblas_handle_ptr create_rocblas_handle_ptr();
rocblas_handle_ptr
create_rocblas_handle_ptr
(
hipStream_t
s
);
}
// namespace gpu
}
// inline namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/targets/gpu/include/migraph/gpu/softmax.hpp
View file @
e1ef1e17
...
...
@@ -7,6 +7,7 @@
#include <migraph/operators.hpp>
#include <migraph/generate.hpp>
#include <migraph/shape_for_each.hpp>
#include <migraph/config.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraph/gpu/hip.hpp>
#include <migraph/dfor.hpp>
...
...
@@ -17,7 +18,7 @@
#include <migraph/gpu/context.hpp>
#include <utility>
namespace
migraph
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
struct
miopen_softmax
...
...
@@ -31,7 +32,7 @@ struct miopen_softmax
};
}
// namespace gpu
}
// inline namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/targets/gpu/include/migraph/gpu/target.hpp
View file @
e1ef1e17
...
...
@@ -2,8 +2,9 @@
#define MIGRAPH_GUARD_MIGRAPHLIB_MIOPEN_TARGET_HPP
#include <migraph/program.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
struct
target
...
...
@@ -12,7 +13,9 @@ struct target
std
::
vector
<
pass
>
get_passes
(
migraph
::
context
&
gctx
)
const
;
migraph
::
context
get_context
()
const
;
};
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/targets/gpu/include/migraph/gpu/write_literals.hpp
View file @
e1ef1e17
...
...
@@ -4,7 +4,7 @@
#include <migraph/program.hpp>
#include <migraph/gpu/context.hpp>
namespace
migraph
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
...
...
@@ -17,7 +17,7 @@ struct write_literals
};
}
// namespace gpu
}
// inline namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/targets/gpu/leaky_relu.cpp
View file @
e1ef1e17
...
...
@@ -5,6 +5,7 @@
#include <utility>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
shape
miopen_leaky_relu
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -33,5 +34,5 @@ argument miopen_leaky_relu::compute(context& ctx,
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/lowering.cpp
View file @
e1ef1e17
...
...
@@ -27,6 +27,7 @@
#include <utility>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
struct
miopen_apply
...
...
@@ -220,4 +221,5 @@ struct miopen_apply
void
lowering
::
apply
(
program
&
p
)
const
{
miopen_apply
{
&
p
,
ctx
}.
apply
();
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/mul.cpp
View file @
e1ef1e17
...
...
@@ -5,6 +5,7 @@
#include <utility>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
shape
hip_mul
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -21,5 +22,5 @@ argument hip_mul::compute(context& ctx, const shape&, const std::vector<argument
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/pooling.cpp
View file @
e1ef1e17
...
...
@@ -5,6 +5,7 @@
#include <utility>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
shape
miopen_pooling
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -37,5 +38,5 @@ argument miopen_pooling::compute(context& ctx,
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/relu.cpp
View file @
e1ef1e17
...
...
@@ -5,6 +5,7 @@
#include <utility>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
shape
miopen_relu
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -33,5 +34,5 @@ argument miopen_relu::compute(context& ctx,
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/rocblas.cpp
View file @
e1ef1e17
#include <migraph/gpu/rocblas.hpp>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
rocblas_handle_ptr
create_rocblas_handle_ptr
()
...
...
@@ -18,5 +19,5 @@ rocblas_handle_ptr create_rocblas_handle_ptr(hipStream_t s)
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/softmax.cpp
View file @
e1ef1e17
...
...
@@ -5,6 +5,7 @@
#include <utility>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
shape
miopen_softmax
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -32,5 +33,5 @@ argument miopen_softmax::compute(context& ctx,
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/target.cpp
View file @
e1ef1e17
...
...
@@ -17,6 +17,7 @@
#include <migraph/fwd_conv_batchnorm_rewrite.hpp>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
std
::
vector
<
pass
>
target
::
get_passes
(
migraph
::
context
&
gctx
)
const
...
...
@@ -56,4 +57,5 @@ std::string target::name() const { return "miopen"; }
migraph
::
context
target
::
get_context
()
const
{
return
context
{};
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/write_literals.cpp
View file @
e1ef1e17
...
...
@@ -5,7 +5,7 @@
#include <migraph/env.hpp>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
MIGRAPH_DECLARE_ENV_VAR
(
MIGRAPH_COPY_LITERALS
)
...
...
@@ -51,5 +51,7 @@ void write_literals::apply(program& p) const
}
}
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
Prev
1
…
3
4
5
6
7
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