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
0b217041
Commit
0b217041
authored
Nov 27, 2018
by
Paul
Browse files
Rename more things to migraphx
parent
53fd3f74
Changes
155
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
51 additions
and
51 deletions
+51
-51
CMakeLists.txt
CMakeLists.txt
+4
-4
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
src/include/migraphx/auto_contiguous.hpp
src/include/migraphx/auto_contiguous.hpp
+4
-4
src/include/migraphx/builtin.hpp
src/include/migraphx/builtin.hpp
+9
-9
No files found.
CMakeLists.txt
View file @
0b217041
...
...
@@ -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
)
...
...
@@ -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
)
...
...
cppcheck.rules
View file @
0b217041
...
...
@@ -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 @
0b217041
...
...
@@ -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 @
0b217041
...
...
@@ -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 @
0b217041
...
...
@@ -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 @
0b217041
...
...
@@ -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 @
0b217041
...
...
@@ -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 @
0b217041
...
...
@@ -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 @
0b217041
...
...
@@ -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 @
0b217041
...
...
@@ -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 @
0b217041
...
...
@@ -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 @
0b217041
...
...
@@ -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 @
0b217041
...
...
@@ -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 @
0b217041
...
...
@@ -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 @
0b217041
...
...
@@ -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 @
0b217041
#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 @
0b217041
#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 @
0b217041
#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
src/include/migraphx/auto_contiguous.hpp
View file @
0b217041
#ifndef MIGRAPH_GUARD_RTGLIB_AUTO_CONTIGOUS_HPP
#define MIGRAPH_GUARD_RTGLIB_AUTO_CONTIGOUS_HPP
#ifndef MIGRAPH
X
_GUARD_RTGLIB_AUTO_CONTIGOUS_HPP
#define MIGRAPH
X
_GUARD_RTGLIB_AUTO_CONTIGOUS_HPP
#include <string>
#include <migraphx/instruction_ref.hpp>
#include <migraphx/config.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
struct
program
;
...
...
@@ -16,7 +16,7 @@ struct auto_contiguous
void
apply
(
program
&
p
)
const
;
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
#endif
src/include/migraphx/builtin.hpp
View file @
0b217041
#ifndef MIGRAPH_GUARD_BUILTIN_HPP
#define MIGRAPH_GUARD_BUILTIN_HPP
#ifndef MIGRAPH
X
_GUARD_BUILTIN_HPP
#define MIGRAPH
X
_GUARD_BUILTIN_HPP
#include <migraphx/context.hpp>
#include <migraphx/errors.hpp>
...
...
@@ -8,17 +8,17 @@
#include <migraphx/config.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
builtin
{
struct
literal
{
std
::
string
name
()
const
{
return
"@literal"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
)
const
{
MIGRAPH_THROW
(
"builtin"
);
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
)
const
{
MIGRAPH
X
_THROW
(
"builtin"
);
}
argument
compute
(
context
&
,
const
shape
&
,
const
std
::
vector
<
argument
>&
)
const
{
MIGRAPH_THROW
(
"builtin"
);
MIGRAPH
X
_THROW
(
"builtin"
);
}
};
...
...
@@ -36,7 +36,7 @@ struct outline
shape
compute_shape
(
const
std
::
vector
<
shape
>&
)
const
{
return
s
;
}
argument
compute
(
context
&
,
const
shape
&
,
const
std
::
vector
<
argument
>&
)
const
{
MIGRAPH_THROW
(
"builtin"
);
MIGRAPH
X
_THROW
(
"builtin"
);
}
};
...
...
@@ -51,10 +51,10 @@ struct param
}
std
::
string
name
()
const
{
return
"@param"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
)
const
{
MIGRAPH_THROW
(
"builtin"
);
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
)
const
{
MIGRAPH
X
_THROW
(
"builtin"
);
}
argument
compute
(
context
&
,
const
shape
&
,
const
std
::
vector
<
argument
>&
)
const
{
MIGRAPH_THROW
(
"builtin"
);
MIGRAPH
X
_THROW
(
"builtin"
);
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
param
&
op
)
{
...
...
@@ -64,7 +64,7 @@ struct param
};
}
// namespace builtin
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraphx
#endif
Prev
1
2
3
4
5
…
8
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