Commit 0b217041 authored by Paul's avatar Paul
Browse files

Rename more things to migraphx

parent 53fd3f74
......@@ -34,9 +34,9 @@ endif()
if(CMAKE_CXX_COMPILER MATCHES ".*hcc")
message(STATUS "Enable miopen backend")
set(MIGRAPH_ENABLE_GPU On CACHE BOOL "")
set(MIGRAPHX_ENABLE_GPU On CACHE BOOL "")
else()
set(MIGRAPH_ENABLE_GPU Off CACHE BOOL "")
set(MIGRAPHX_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 MIGraphX
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)
......
......@@ -34,7 +34,7 @@
</rule>
<rule>
<tokenlist>define</tokenlist>
<pattern>define (MIGRAP|[^H]{6})[^H][^_]</pattern>
<pattern>define (MIGRAPH|[^X]{7})[^X][^_]</pattern>
<message>
<id>definePrefix</id>
<severity>style</severity>
......
......@@ -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/MIGRAPHX_INLINE_NS:://g" *.xml
WORKING_DIRECTORY ${DOXYGEN_OUTPUT}/xml)
add_dependencies(remove_inline_ns doxygen)
......
......@@ -21,7 +21,7 @@ raw_data
.. doxygenstruct:: migraphx::raw_data
.. doxygenfunction:: migraphx::MIGRAPH_INLINE_NS::visit_all
.. doxygenfunction:: migraphx::MIGRAPHX_INLINE_NS::visit_all
tensor_view
......
......@@ -21,4 +21,4 @@ program
parse_onnx
----------
.. doxygenfunction:: migraphx::MIGRAPH_INLINE_NS::parse_onnx
.. doxygenfunction:: migraphx::MIGRAPHX_INLINE_NS::parse_onnx
......@@ -36,7 +36,7 @@ set(PACKAGE_DEPENDS)
add_subdirectory(onnx)
add_subdirectory(targets/cpu)
if(MIGRAPH_ENABLE_GPU)
if(MIGRAPHX_ENABLE_GPU)
list(APPEND PACKAGE_DEPENDS MIOpen rocblas)
add_subdirectory(targets/gpu)
endif()
......
......@@ -5,7 +5,7 @@
#include <migraphx/iterator_for.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_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 MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -8,7 +8,7 @@
#include <unordered_set>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_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 MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -4,7 +4,7 @@
#include <migraphx/literal.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_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 MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -6,7 +6,7 @@
#include <migraphx/ranges.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_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 MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -8,12 +8,12 @@
#include <migraphx/pass_config.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
void eliminate_allocation::apply(program& p) const
{
assert(alignment > 0);
if(!enabled(MIGRAPH_DISABLE_MEMORY_COLORING{}))
if(!enabled(MIGRAPHX_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 MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -7,7 +7,7 @@
#include <migraphx/dfor.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_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 MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -8,7 +8,7 @@
#include <utility>
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)
{
......@@ -47,5 +47,5 @@ void eliminate_contiguous::apply(program& p) const
}
}
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -3,7 +3,7 @@
#include <cstdlib>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_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 MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -6,7 +6,7 @@
#include <migraphx/dfor.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_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 MIGRAPHX_INLINE_NS
} // namespace migraphx
#include <migraphx/generate.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_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 MIGRAPHX_INLINE_NS
} // namespace migraphx
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_ARGUMENT_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_ARGUMENT_HPP
#ifndef MIGRAPHX_GUARD_MIGRAPHLIB_ARGUMENT_HPP
#define MIGRAPHX_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 MIGRAPHX_INLINE_NS {
/**
* @brief Arguments passed to instructions
......@@ -47,7 +47,7 @@ struct argument : raw_data<argument>
shape m_shape;
};
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
#endif
#ifndef MIGRAPH_GUARD_RTGLIB_AUTO_ANY_CAST_HPP
#define MIGRAPH_GUARD_RTGLIB_AUTO_ANY_CAST_HPP
#ifndef MIGRAPHX_GUARD_RTGLIB_AUTO_ANY_CAST_HPP
#define MIGRAPHX_GUARD_RTGLIB_AUTO_ANY_CAST_HPP
#include <migraphx/config.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_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 MIGRAPHX_INLINE_NS
} // namespace migraphx
#endif
#ifndef MIGRAPH_GUARD_RTGLIB_AUTO_CONTIGOUS_HPP
#define MIGRAPH_GUARD_RTGLIB_AUTO_CONTIGOUS_HPP
#ifndef MIGRAPHX_GUARD_RTGLIB_AUTO_CONTIGOUS_HPP
#define MIGRAPHX_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 MIGRAPHX_INLINE_NS {
struct program;
......@@ -16,7 +16,7 @@ struct auto_contiguous
void apply(program& p) const;
};
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
#endif
#ifndef MIGRAPH_GUARD_BUILTIN_HPP
#define MIGRAPH_GUARD_BUILTIN_HPP
#ifndef MIGRAPHX_GUARD_BUILTIN_HPP
#define MIGRAPHX_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 MIGRAPHX_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 { MIGRAPHX_THROW("builtin"); }
argument compute(context&, const shape&, const std::vector<argument>&) const
{
MIGRAPH_THROW("builtin");
MIGRAPHX_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");
MIGRAPHX_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 { MIGRAPHX_THROW("builtin"); }
argument compute(context&, const shape&, const std::vector<argument>&) const
{
MIGRAPH_THROW("builtin");
MIGRAPHX_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 MIGRAPHX_INLINE_NS
} // namespace migraphx
#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