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
d79346d1
Commit
d79346d1
authored
Nov 05, 2018
by
Shucai Xiao
Browse files
Added inline namespace for all .hpp and .cpp file.
parent
7d972d2b
Changes
134
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
47 additions
and
14 deletions
+47
-14
src/targets/cpu/lowering.cpp
src/targets/cpu/lowering.cpp
+2
-1
src/targets/cpu/target.cpp
src/targets/cpu/target.cpp
+2
-1
src/targets/gpu/add.cpp
src/targets/gpu/add.cpp
+3
-1
src/targets/gpu/batchnorm.cpp
src/targets/gpu/batchnorm.cpp
+2
-1
src/targets/gpu/concat.cpp
src/targets/gpu/concat.cpp
+2
-1
src/targets/gpu/contiguous.cpp
src/targets/gpu/contiguous.cpp
+2
-1
src/targets/gpu/convolution.cpp
src/targets/gpu/convolution.cpp
+2
-1
src/targets/gpu/device/add.cpp
src/targets/gpu/device/add.cpp
+2
-0
src/targets/gpu/device/add_relu.cpp
src/targets/gpu/device/add_relu.cpp
+2
-0
src/targets/gpu/device/concat.cpp
src/targets/gpu/device/concat.cpp
+2
-0
src/targets/gpu/device/contiguous.cpp
src/targets/gpu/device/contiguous.cpp
+2
-0
src/targets/gpu/device/include/migraph/gpu/device/launch.hpp
src/targets/gpu/device/include/migraph/gpu/device/launch.hpp
+3
-1
src/targets/gpu/device/include/migraph/gpu/device/nary.hpp
src/targets/gpu/device/include/migraph/gpu/device/nary.hpp
+3
-1
src/targets/gpu/device/include/migraph/gpu/device/tensor.hpp
src/targets/gpu/device/include/migraph/gpu/device/tensor.hpp
+3
-1
src/targets/gpu/device/include/migraph/gpu/device/types.hpp
src/targets/gpu/device/include/migraph/gpu/device/types.hpp
+3
-1
src/targets/gpu/device/mul.cpp
src/targets/gpu/device/mul.cpp
+2
-0
src/targets/gpu/eliminate_workspace.cpp
src/targets/gpu/eliminate_workspace.cpp
+3
-0
src/targets/gpu/fuse_ops.cpp
src/targets/gpu/fuse_ops.cpp
+2
-2
src/targets/gpu/gemm.cpp
src/targets/gpu/gemm.cpp
+2
-1
src/targets/gpu/hip.cpp
src/targets/gpu/hip.cpp
+3
-0
No files found.
src/targets/cpu/lowering.cpp
View file @
d79346d1
...
...
@@ -10,6 +10,7 @@
#include <utility>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
cpu
{
template
<
typename
T
>
...
...
@@ -657,5 +658,5 @@ struct cpu_apply
void
lowering
::
apply
(
program
&
p
)
const
{
cpu_apply
{
&
p
}.
apply
();
}
}
// namespace cpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/cpu/target.cpp
View file @
d79346d1
...
...
@@ -4,6 +4,7 @@
#include <migraph/auto_contiguous.hpp>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
cpu
{
std
::
string
target
::
name
()
const
{
return
"cpu"
;
}
...
...
@@ -14,5 +15,5 @@ std::vector<pass> target::get_passes(migraph::context&) const
}
}
// namespace cpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/add.cpp
View file @
d79346d1
#include <migraph/gpu/add.hpp>
#include <migraph/operators.hpp>
#include <migraph/manage_ptr.hpp>
#include <migraph/config.hpp>
#include <migraph/gpu/miopen.hpp>
#include <utility>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
shape
hip_add
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -49,5 +51,5 @@ argument miopen_add::compute(context& ctx,
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/batchnorm.cpp
View file @
d79346d1
...
...
@@ -5,6 +5,7 @@
#include <utility>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
shape
miopen_batch_norm_inference
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -42,5 +43,5 @@ argument miopen_batch_norm_inference::compute(context& ctx,
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/concat.cpp
View file @
d79346d1
...
...
@@ -6,6 +6,7 @@
#include <utility>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
shape
hip_concat
::
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
...
...
@@ -23,5 +24,5 @@ argument hip_concat::compute(context& ctx,
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/contiguous.cpp
View file @
d79346d1
...
...
@@ -5,6 +5,7 @@
#include <utility>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
shape
miopen_contiguous
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -24,5 +25,5 @@ argument miopen_contiguous::compute(context& ctx,
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/convolution.cpp
View file @
d79346d1
...
...
@@ -5,6 +5,7 @@
#include <utility>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
shape
miopen_convolution
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -81,5 +82,5 @@ shape miopen_convolution::compile(context& ctx,
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/device/add.cpp
View file @
d79346d1
...
...
@@ -2,6 +2,7 @@
#include <migraph/gpu/device/nary.hpp>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
namespace
device
{
...
...
@@ -21,4 +22,5 @@ void add(hipStream_t stream,
}
// namespace device
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/device/add_relu.cpp
View file @
d79346d1
...
...
@@ -2,6 +2,7 @@
#include <migraph/gpu/device/nary.hpp>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
namespace
device
{
...
...
@@ -26,4 +27,5 @@ void add_relu(hipStream_t stream,
}
// namespace device
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/device/concat.cpp
View file @
d79346d1
...
...
@@ -5,6 +5,7 @@
#include <migraph/gpu/device/launch.hpp>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
namespace
device
{
...
...
@@ -33,4 +34,5 @@ argument concat(hipStream_t stream,
}
// namespace device
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/device/contiguous.cpp
View file @
d79346d1
...
...
@@ -3,6 +3,7 @@
#include <migraph/gpu/device/nary.hpp>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
namespace
device
{
...
...
@@ -13,4 +14,5 @@ void contiguous(hipStream_t stream, argument result, argument arg)
}
// namespace device
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/device/include/migraph/gpu/device/launch.hpp
View file @
d79346d1
...
...
@@ -2,8 +2,9 @@
#define MIGRAPH_GUARD_RTGLIB_DEVICE_LAUNCH_HPP
#include <hip/hip_runtime.h>
#include <migraph/config.hpp>
namespace
migraph
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
namespace
device
{
...
...
@@ -58,6 +59,7 @@ inline auto gs_launch(hipStream_t stream, std::size_t n, std::size_t local = 102
}
// namespace device
}
// namespace gpu
}
// inline namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/targets/gpu/device/include/migraph/gpu/device/nary.hpp
View file @
d79346d1
...
...
@@ -6,8 +6,9 @@
#include <migraph/gpu/device/types.hpp>
#include <migraph/functional.hpp>
#include <migraph/ranges.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
namespace
device
{
...
...
@@ -394,6 +395,7 @@ inline auto nary(hipStream_t stream,
}
// namespace device
}
// namespace gpu
}
// inline namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/targets/gpu/device/include/migraph/gpu/device/tensor.hpp
View file @
d79346d1
...
...
@@ -3,8 +3,9 @@
#include <hip/hip_runtime.h>
#include <migraph/functional.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
namespace
device
{
...
...
@@ -85,6 +86,7 @@ struct hip_tensor_descriptor
}
// namespace device
}
// namespace gpu
}
// inline namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/targets/gpu/device/include/migraph/gpu/device/types.hpp
View file @
d79346d1
...
...
@@ -9,8 +9,9 @@
#define MIGRAPH_GUARD_RTGLIB_GPU_DEVICE_TYPES_HPP
#include <migraph/half.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
namespace
device
{
...
...
@@ -75,6 +76,7 @@ device_type<T>* device_cast(T* x)
}
// namespace device
}
// namespace gpu
}
// inline namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/targets/gpu/device/mul.cpp
View file @
d79346d1
...
...
@@ -2,6 +2,7 @@
#include <migraph/gpu/device/nary.hpp>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
namespace
device
{
...
...
@@ -21,4 +22,5 @@ void mul(hipStream_t stream,
}
// namespace device
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/eliminate_workspace.cpp
View file @
d79346d1
...
...
@@ -9,6 +9,7 @@
#include <migraph/pass_config.hpp>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
void
eliminate_workspace
::
apply
(
program
&
p
)
const
...
...
@@ -38,5 +39,7 @@ void eliminate_workspace::apply(program& p) const
p
.
remove_instruction
(
a
);
}
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/fuse_ops.cpp
View file @
d79346d1
...
...
@@ -6,7 +6,7 @@
#include <migraph/instruction.hpp>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
struct
fusion
...
...
@@ -382,5 +382,5 @@ void fuse_ops::apply(program& p) const
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/gemm.cpp
View file @
d79346d1
...
...
@@ -5,6 +5,7 @@
#include <utility>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
shape
miopen_gemm
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -44,5 +45,5 @@ argument miopen_gemm::compute(context& ctx,
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
src/targets/gpu/hip.cpp
View file @
d79346d1
...
...
@@ -7,6 +7,7 @@
#include <vector>
namespace
migraph
{
namespace
MIGRAPH_INLINE_NS
{
namespace
gpu
{
using
hip_ptr
=
MIGRAPH_MANAGE_PTR
(
void
,
hipFree
);
...
...
@@ -107,5 +108,7 @@ void copy_to_gpu(argument src, argument dst)
if
(
status
!=
hipSuccess
)
MIGRAPH_THROW
(
"Copy to gpu failed: "
+
hip_error
(
status
));
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
Prev
1
2
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