Commit bb390b65 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

Merge branch 'activationOperators' into addLogExpOperators

parents adfa1a93 682ad83a
...@@ -104,4 +104,4 @@ CheckOptions: ...@@ -104,4 +104,4 @@ CheckOptions:
# - key: readability-identifier-naming.MacroDefinitionCase # - key: readability-identifier-naming.MacroDefinitionCase
# value: UPPER_CASE # value: UPPER_CASE
# - key: readability-identifier-naming.MacroDefinitionPrefix # - key: readability-identifier-naming.MacroDefinitionPrefix
# value: MIGRAPH_ # value: MIGRAPHX_
...@@ -34,9 +34,9 @@ endif() ...@@ -34,9 +34,9 @@ endif()
if(CMAKE_CXX_COMPILER MATCHES ".*hcc") if(CMAKE_CXX_COMPILER MATCHES ".*hcc")
message(STATUS "Enable miopen backend") message(STATUS "Enable miopen backend")
set(MIGRAPH_ENABLE_GPU On CACHE BOOL "") set(MIGRAPHX_ENABLE_GPU On CACHE BOOL "")
else() else()
set(MIGRAPH_ENABLE_GPU Off CACHE BOOL "") set(MIGRAPHX_ENABLE_GPU Off CACHE BOOL "")
endif() endif()
add_compile_options(-std=c++14) add_compile_options(-std=c++14)
...@@ -93,7 +93,7 @@ rocm_enable_clang_tidy( ...@@ -93,7 +93,7 @@ rocm_enable_clang_tidy(
HEADER_FILTER HEADER_FILTER
".*hpp" ".*hpp"
EXTRA_ARGS EXTRA_ARGS
-DMIGRAPH_USE_CLANG_TIDY -DMIGRAPHX_USE_CLANG_TIDY
) )
include(ROCMCppCheck) include(ROCMCppCheck)
...@@ -132,11 +132,11 @@ enable_testing() ...@@ -132,11 +132,11 @@ enable_testing()
include(ROCMCreatePackage) include(ROCMCreatePackage)
rocm_create_package( rocm_create_package(
NAME MIGraph NAME MIGraphX
DESCRIPTION "AMD's graph optimizer" DESCRIPTION "AMD's graph optimizer"
MAINTAINER "Paul Fultz II <paul.fultz@amd.com>" MAINTAINER "Paul Fultz II <paul.fultz@amd.com>"
LDCONFIG LDCONFIG
DEPENDS miopen-hip rocblas hip_hcc DEPENDS miopen-hip rocblas hip_hcc half
) )
add_subdirectory(src) add_subdirectory(src)
......
...@@ -91,7 +91,7 @@ rocmtest tidy: rocmnode('rocmtest') { cmake_build -> ...@@ -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 - {}\' | 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') { stage('Clang Debug') {
// TODO: Enanle integer // TODO: Enanle integer
def sanitizers = "undefined" def sanitizers = "undefined"
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</rule> </rule>
<rule> <rule>
<tokenlist>define</tokenlist> <tokenlist>define</tokenlist>
<pattern>define (MIGRAP|[^H]{6})[^H][^_]</pattern> <pattern>define (MIGRAPH|[^X]{7})[^X][^_]</pattern>
<message> <message>
<id>definePrefix</id> <id>definePrefix</id>
<severity>style</severity> <severity>style</severity>
......
...@@ -32,7 +32,7 @@ add_doxygen_doc( ...@@ -32,7 +32,7 @@ add_doxygen_doc(
PREDEFINED DOXYGEN PREDEFINED DOXYGEN
) )
add_custom_target(remove_inline_ns add_custom_target(remove_inline_ns
sed -i "s/MIGRAPH_INLINE_NS:://g" *.xml sed -i "s/MIGRAPHX_INLINE_NS:://g" *.xml
WORKING_DIRECTORY ${DOXYGEN_OUTPUT}/xml) WORKING_DIRECTORY ${DOXYGEN_OUTPUT}/xml)
add_dependencies(remove_inline_ns doxygen) add_dependencies(remove_inline_ns doxygen)
......
...@@ -21,7 +21,7 @@ raw_data ...@@ -21,7 +21,7 @@ raw_data
.. doxygenstruct:: migraphx::raw_data .. doxygenstruct:: migraphx::raw_data
.. doxygenfunction:: migraphx::MIGRAPH_INLINE_NS::visit_all .. doxygenfunction:: migraphx::MIGRAPHX_INLINE_NS::visit_all
tensor_view tensor_view
......
...@@ -21,4 +21,4 @@ program ...@@ -21,4 +21,4 @@ program
parse_onnx parse_onnx
---------- ----------
.. doxygenfunction:: migraphx::MIGRAPH_INLINE_NS::parse_onnx .. doxygenfunction:: migraphx::MIGRAPHX_INLINE_NS::parse_onnx
...@@ -36,7 +36,7 @@ set(PACKAGE_DEPENDS) ...@@ -36,7 +36,7 @@ set(PACKAGE_DEPENDS)
add_subdirectory(onnx) add_subdirectory(onnx)
add_subdirectory(targets/cpu) add_subdirectory(targets/cpu)
if(MIGRAPH_ENABLE_GPU) if(MIGRAPHX_ENABLE_GPU)
list(APPEND PACKAGE_DEPENDS MIOpen rocblas) list(APPEND PACKAGE_DEPENDS MIOpen rocblas)
add_subdirectory(targets/gpu) add_subdirectory(targets/gpu)
endif() endif()
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <migraphx/iterator_for.hpp> #include <migraphx/iterator_for.hpp>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
void auto_contiguous::apply(program& p) const void auto_contiguous::apply(program& p) const
{ {
...@@ -20,5 +20,5 @@ void auto_contiguous::apply(program& p) const ...@@ -20,5 +20,5 @@ void auto_contiguous::apply(program& p) const
} }
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx } // namespace migraphx
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <unordered_set> #include <unordered_set>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
template <class Range> template <class Range>
void cse_range(program& p, Range&& r) void cse_range(program& p, Range&& r)
...@@ -35,5 +35,5 @@ 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)); } void common_subexpression_elimination::apply(program& p) const { cse_range(p, iterator_for(p)); }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx } // namespace migraphx
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <migraphx/literal.hpp> #include <migraphx/literal.hpp>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
struct match_const_add struct match_const_add
{ {
...@@ -26,5 +26,5 @@ 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{}); } void constant_propagate::apply(program& p) const { match::find_matches(p, match_const_add{}); }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx } // namespace migraphx
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <migraphx/ranges.hpp> #include <migraphx/ranges.hpp>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
template <class Range, class Iterator> template <class Range, class Iterator>
std::ptrdiff_t bidistance(const Range& r, Iterator start, Iterator last) std::ptrdiff_t bidistance(const Range& r, Iterator start, Iterator last)
...@@ -62,5 +62,5 @@ void dead_code_elimination::apply(program& p) const ...@@ -62,5 +62,5 @@ void dead_code_elimination::apply(program& p) const
p.remove_instructions(std::next(last), p.end()); p.remove_instructions(std::next(last), p.end());
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx } // namespace migraphx
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
#include <migraphx/pass_config.hpp> #include <migraphx/pass_config.hpp>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
void eliminate_allocation::apply(program& p) const void eliminate_allocation::apply(program& p) const
{ {
assert(alignment > 0); assert(alignment > 0);
if(!enabled(MIGRAPH_DISABLE_MEMORY_COLORING{})) if(!enabled(MIGRAPHX_DISABLE_MEMORY_COLORING{}))
return; return;
std::size_t n = 0; std::size_t n = 0;
...@@ -37,5 +37,5 @@ void eliminate_allocation::apply(program& p) const ...@@ -37,5 +37,5 @@ void eliminate_allocation::apply(program& p) const
} }
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx } // namespace migraphx
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <migraphx/dfor.hpp> #include <migraphx/dfor.hpp>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
void eliminate_concat::apply(program& p) const void eliminate_concat::apply(program& p) const
{ {
for(auto ins : iterator_for(p)) for(auto ins : iterator_for(p))
...@@ -67,5 +67,5 @@ void eliminate_concat::apply(program& p) const ...@@ -67,5 +67,5 @@ void eliminate_concat::apply(program& p) const
} }
} }
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx } // namespace migraphx
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <utility> #include <utility>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
bool try_compute_shape(const operation& op, const std::vector<instruction_ref>& args) bool try_compute_shape(const operation& op, const std::vector<instruction_ref>& args)
{ {
...@@ -47,5 +47,5 @@ void eliminate_contiguous::apply(program& p) const ...@@ -47,5 +47,5 @@ void eliminate_contiguous::apply(program& p) const
} }
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx } // namespace migraphx
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include <cstdlib> #include <cstdlib>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
bool enabled(const char* name) bool enabled(const char* name)
{ {
...@@ -30,5 +30,5 @@ std::vector<std::string> env(const char* name) ...@@ -30,5 +30,5 @@ std::vector<std::string> env(const char* name)
return {{p}}; return {{p}};
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx } // namespace migraphx
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <migraphx/dfor.hpp> #include <migraphx/dfor.hpp>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
void fwd_conv_batchnorm_rewrite::apply(program& p) const void fwd_conv_batchnorm_rewrite::apply(program& p) const
{ {
...@@ -67,5 +67,5 @@ 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 MIGRAPHX_INLINE_NS
} // namespace migraphx } // namespace migraphx
#include <migraphx/generate.hpp> #include <migraphx/generate.hpp>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
argument generate_argument(shape s, unsigned long seed) argument generate_argument(shape s, unsigned long seed)
{ {
...@@ -31,5 +31,5 @@ literal abs(literal l) ...@@ -31,5 +31,5 @@ literal abs(literal l)
return transform(std::move(l), [](auto x) { return std::fabs(x); }); return transform(std::move(l), [](auto x) { return std::fabs(x); });
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx } // namespace migraphx
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_ARGUMENT_HPP #ifndef MIGRAPHX_GUARD_MIGRAPHLIB_ARGUMENT_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_ARGUMENT_HPP #define MIGRAPHX_GUARD_MIGRAPHLIB_ARGUMENT_HPP
#include <migraphx/shape.hpp> #include <migraphx/shape.hpp>
#include <migraphx/raw_data.hpp> #include <migraphx/raw_data.hpp>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <utility> #include <utility>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
/** /**
* @brief Arguments passed to instructions * @brief Arguments passed to instructions
...@@ -47,7 +47,7 @@ struct argument : raw_data<argument> ...@@ -47,7 +47,7 @@ struct argument : raw_data<argument>
shape m_shape; shape m_shape;
}; };
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx } // namespace migraphx
#endif #endif
#ifndef MIGRAPH_GUARD_RTGLIB_AUTO_ANY_CAST_HPP #ifndef MIGRAPHX_GUARD_RTGLIB_AUTO_ANY_CAST_HPP
#define MIGRAPH_GUARD_RTGLIB_AUTO_ANY_CAST_HPP #define MIGRAPHX_GUARD_RTGLIB_AUTO_ANY_CAST_HPP
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
namespace detail { namespace detail {
...@@ -34,7 +34,7 @@ detail::auto_any_caster<T> auto_any_cast(T& x) ...@@ -34,7 +34,7 @@ detail::auto_any_caster<T> auto_any_cast(T& x)
return {x}; return {x};
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx } // namespace migraphx
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment