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
682ad83a
Commit
682ad83a
authored
Nov 28, 2018
by
Shucai Xiao
Browse files
merge rename migraph to migraphx from master.
parents
66e48e7e
84e7335e
Changes
195
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
41 additions
and
41 deletions
+41
-41
.clang-tidy
.clang-tidy
+1
-1
CMakeLists.txt
CMakeLists.txt
+5
-5
Jenkinsfile
Jenkinsfile
+1
-1
cppcheck.rules
cppcheck.rules
+1
-1
doc/CMakeLists.txt
doc/CMakeLists.txt
+1
-1
doc/src/reference/data.rst
doc/src/reference/data.rst
+1
-1
doc/src/reference/program.rst
doc/src/reference/program.rst
+1
-1
src/CMakeLists.txt
src/CMakeLists.txt
+1
-1
src/auto_contiguous.cpp
src/auto_contiguous.cpp
+2
-2
src/common_subexpression_elimination.cpp
src/common_subexpression_elimination.cpp
+2
-2
src/constant_propagate.cpp
src/constant_propagate.cpp
+2
-2
src/dead_code_elimination.cpp
src/dead_code_elimination.cpp
+2
-2
src/eliminate_allocation.cpp
src/eliminate_allocation.cpp
+3
-3
src/eliminate_concat.cpp
src/eliminate_concat.cpp
+2
-2
src/eliminate_contiguous.cpp
src/eliminate_contiguous.cpp
+2
-2
src/env.cpp
src/env.cpp
+2
-2
src/fwd_conv_batchnorm_rewrite.cpp
src/fwd_conv_batchnorm_rewrite.cpp
+2
-2
src/generate.cpp
src/generate.cpp
+2
-2
src/include/migraphx/argument.hpp
src/include/migraphx/argument.hpp
+4
-4
src/include/migraphx/auto_any_cast.hpp
src/include/migraphx/auto_any_cast.hpp
+4
-4
No files found.
.clang-tidy
View file @
682ad83a
...
...
@@ -104,4 +104,4 @@ CheckOptions:
# - key: readability-identifier-naming.MacroDefinitionCase
# value: UPPER_CASE
# - key: readability-identifier-naming.MacroDefinitionPrefix
# value: MIGRAPH_
# value: MIGRAPH
X
_
CMakeLists.txt
View file @
682ad83a
...
...
@@ -34,9 +34,9 @@ endif()
if
(
CMAKE_CXX_COMPILER MATCHES
".*hcc"
)
message
(
STATUS
"Enable miopen backend"
)
set
(
MIGRAPH_ENABLE_GPU On CACHE BOOL
""
)
set
(
MIGRAPH
X
_ENABLE_GPU On CACHE BOOL
""
)
else
()
set
(
MIGRAPH_ENABLE_GPU Off CACHE BOOL
""
)
set
(
MIGRAPH
X
_ENABLE_GPU Off CACHE BOOL
""
)
endif
()
add_compile_options
(
-std=c++14
)
...
...
@@ -93,7 +93,7 @@ rocm_enable_clang_tidy(
HEADER_FILTER
".*hpp"
EXTRA_ARGS
-DMIGRAPH_USE_CLANG_TIDY
-DMIGRAPH
X
_USE_CLANG_TIDY
)
include
(
ROCMCppCheck
)
...
...
@@ -132,11 +132,11 @@ enable_testing()
include
(
ROCMCreatePackage
)
rocm_create_package
(
NAME MIGraph
NAME MIGraph
X
DESCRIPTION
"AMD's graph optimizer"
MAINTAINER
"Paul Fultz II <paul.fultz@amd.com>"
LDCONFIG
DEPENDS miopen-hip rocblas hip_hcc
DEPENDS miopen-hip rocblas hip_hcc
half
)
add_subdirectory
(
src
)
...
...
Jenkinsfile
View file @
682ad83a
...
...
@@ -91,7 +91,7 @@ rocmtest tidy: rocmnode('rocmtest') { cmake_build ->
| xargs -n 1 -P 1 -I{} -t sh -c \'clang-format-5.0 -style=file {} | diff - {}\'
'''
}
},
clang:
rocmnode
(
'
rocmtest
'
)
{
cmake_build
->
},
clang:
rocmnode
(
'
vega
'
)
{
cmake_build
->
stage
(
'Clang Debug'
)
{
// TODO: Enanle integer
def
sanitizers
=
"undefined"
...
...
cppcheck.rules
View file @
682ad83a
...
...
@@ -34,7 +34,7 @@
</rule>
<rule>
<tokenlist>
define
</tokenlist>
<pattern>
define (MIGRAP|[^
H
]{
6
})[^
H
][^_]
</pattern>
<pattern>
define (MIGRAP
H
|[^
X
]{
7
})[^
X
][^_]
</pattern>
<message>
<id>
definePrefix
</id>
<severity>
style
</severity>
...
...
doc/CMakeLists.txt
View file @
682ad83a
...
...
@@ -32,7 +32,7 @@ add_doxygen_doc(
PREDEFINED DOXYGEN
)
add_custom_target
(
remove_inline_ns
sed -i
"s/MIGRAPH_INLINE_NS:://g"
*.xml
sed -i
"s/MIGRAPH
X
_INLINE_NS:://g"
*.xml
WORKING_DIRECTORY
${
DOXYGEN_OUTPUT
}
/xml
)
add_dependencies
(
remove_inline_ns doxygen
)
...
...
doc/src/reference/data.rst
View file @
682ad83a
...
...
@@ -21,7 +21,7 @@ raw_data
.. doxygenstruct:: migraphx::raw_data
.. doxygenfunction:: migraphx::MIGRAPH_INLINE_NS::visit_all
.. doxygenfunction:: migraphx::MIGRAPH
X
_INLINE_NS::visit_all
tensor_view
...
...
doc/src/reference/program.rst
View file @
682ad83a
...
...
@@ -21,4 +21,4 @@ program
parse_onnx
----------
.. doxygenfunction:: migraphx::MIGRAPH_INLINE_NS::parse_onnx
.. doxygenfunction:: migraphx::MIGRAPH
X
_INLINE_NS::parse_onnx
src/CMakeLists.txt
View file @
682ad83a
...
...
@@ -36,7 +36,7 @@ set(PACKAGE_DEPENDS)
add_subdirectory
(
onnx
)
add_subdirectory
(
targets/cpu
)
if
(
MIGRAPH_ENABLE_GPU
)
if
(
MIGRAPH
X
_ENABLE_GPU
)
list
(
APPEND PACKAGE_DEPENDS MIOpen rocblas
)
add_subdirectory
(
targets/gpu
)
endif
()
...
...
src/auto_contiguous.cpp
View file @
682ad83a
...
...
@@ -5,7 +5,7 @@
#include <migraphx/iterator_for.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
void
auto_contiguous
::
apply
(
program
&
p
)
const
{
...
...
@@ -20,5 +20,5 @@ void auto_contiguous::apply(program& p) const
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/common_subexpression_elimination.cpp
View file @
682ad83a
...
...
@@ -8,7 +8,7 @@
#include <unordered_set>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
template
<
class
Range
>
void
cse_range
(
program
&
p
,
Range
&&
r
)
...
...
@@ -35,5 +35,5 @@ void cse_range(program& p, Range&& r)
void
common_subexpression_elimination
::
apply
(
program
&
p
)
const
{
cse_range
(
p
,
iterator_for
(
p
));
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/constant_propagate.cpp
View file @
682ad83a
...
...
@@ -4,7 +4,7 @@
#include <migraphx/literal.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
struct
match_const_add
{
...
...
@@ -26,5 +26,5 @@ struct match_const_add
void
constant_propagate
::
apply
(
program
&
p
)
const
{
match
::
find_matches
(
p
,
match_const_add
{});
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/dead_code_elimination.cpp
View file @
682ad83a
...
...
@@ -6,7 +6,7 @@
#include <migraphx/ranges.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
template
<
class
Range
,
class
Iterator
>
std
::
ptrdiff_t
bidistance
(
const
Range
&
r
,
Iterator
start
,
Iterator
last
)
...
...
@@ -62,5 +62,5 @@ void dead_code_elimination::apply(program& p) const
p
.
remove_instructions
(
std
::
next
(
last
),
p
.
end
());
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/eliminate_allocation.cpp
View file @
682ad83a
...
...
@@ -8,12 +8,12 @@
#include <migraphx/pass_config.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
void
eliminate_allocation
::
apply
(
program
&
p
)
const
{
assert
(
alignment
>
0
);
if
(
!
enabled
(
MIGRAPH_DISABLE_MEMORY_COLORING
{}))
if
(
!
enabled
(
MIGRAPH
X
_DISABLE_MEMORY_COLORING
{}))
return
;
std
::
size_t
n
=
0
;
...
...
@@ -37,5 +37,5 @@ void eliminate_allocation::apply(program& p) const
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/eliminate_concat.cpp
View file @
682ad83a
...
...
@@ -7,7 +7,7 @@
#include <migraphx/dfor.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
void
eliminate_concat
::
apply
(
program
&
p
)
const
{
for
(
auto
ins
:
iterator_for
(
p
))
...
...
@@ -67,5 +67,5 @@ void eliminate_concat::apply(program& p) const
}
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/eliminate_contiguous.cpp
View file @
682ad83a
...
...
@@ -8,7 +8,7 @@
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
bool
try_compute_shape
(
const
operation
&
op
,
const
std
::
vector
<
instruction_ref
>&
args
)
{
...
...
@@ -47,5 +47,5 @@ void eliminate_contiguous::apply(program& p) const
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/env.cpp
View file @
682ad83a
...
...
@@ -3,7 +3,7 @@
#include <cstdlib>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
bool
enabled
(
const
char
*
name
)
{
...
...
@@ -30,5 +30,5 @@ std::vector<std::string> env(const char* name)
return
{{
p
}};
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/fwd_conv_batchnorm_rewrite.cpp
View file @
682ad83a
...
...
@@ -6,7 +6,7 @@
#include <migraphx/dfor.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
void
fwd_conv_batchnorm_rewrite
::
apply
(
program
&
p
)
const
{
...
...
@@ -67,5 +67,5 @@ void fwd_conv_batchnorm_rewrite::apply(program& p) const
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/generate.cpp
View file @
682ad83a
#include <migraphx/generate.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
argument
generate_argument
(
shape
s
,
unsigned
long
seed
)
{
...
...
@@ -31,5 +31,5 @@ literal abs(literal l)
return
transform
(
std
::
move
(
l
),
[](
auto
x
)
{
return
std
::
fabs
(
x
);
});
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
src/include/migraphx/argument.hpp
View file @
682ad83a
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_ARGUMENT_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_ARGUMENT_HPP
#ifndef MIGRAPH
X
_GUARD_MIGRAPHLIB_ARGUMENT_HPP
#define MIGRAPH
X
_GUARD_MIGRAPHLIB_ARGUMENT_HPP
#include <migraphx/shape.hpp>
#include <migraphx/raw_data.hpp>
...
...
@@ -8,7 +8,7 @@
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
/**
* @brief Arguments passed to instructions
...
...
@@ -47,7 +47,7 @@ struct argument : raw_data<argument>
shape
m_shape
;
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
#endif
src/include/migraphx/auto_any_cast.hpp
View file @
682ad83a
#ifndef MIGRAPH_GUARD_RTGLIB_AUTO_ANY_CAST_HPP
#define MIGRAPH_GUARD_RTGLIB_AUTO_ANY_CAST_HPP
#ifndef MIGRAPH
X
_GUARD_RTGLIB_AUTO_ANY_CAST_HPP
#define MIGRAPH
X
_GUARD_RTGLIB_AUTO_ANY_CAST_HPP
#include <migraphx/config.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
detail
{
...
...
@@ -34,7 +34,7 @@ detail::auto_any_caster<T> auto_any_cast(T& x)
return
{
x
};
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
#endif
Prev
1
2
3
4
5
…
10
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