Unverified Commit 65c5581f authored by Paul Fultz II's avatar Paul Fultz II Committed by GitHub
Browse files

Merge branch 'master' into identity

parents 453fa37a f04a3ba6
......@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_ERASE_HPP
#include <algorithm>
#include <migraph/config.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
/**
......@@ -34,6 +34,6 @@ auto erase_if(R&& r, P&& pred)
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
......@@ -4,12 +4,12 @@
#include <exception>
#include <stdexcept>
#include <string>
#include <migraph/config.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
/// Represents exceptions that can be thrown by migraphlib
/// Represents exceptions that can be thrown by migraphxlib
struct exception : std::runtime_error
{
exception(const std::string& msg = "") : std::runtime_error(msg) {}
......@@ -44,9 +44,9 @@ inline std::string make_source_context(const std::string& file, int line)
* @brief Throw an exception with context information
*/
#define MIGRAPH_THROW(...) \
throw migraph::make_exception(migraph::make_source_context(__FILE__, __LINE__), __VA_ARGS__)
throw migraphx::make_exception(migraphx::make_source_context(__FILE__, __LINE__), __VA_ARGS__)
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
#ifndef MIGRAPH_GUARD_FALLTHROUGH_HPP
#define MIGRAPH_GUARD_FALLTHROUGH_HPP
#include <migraph/config.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
#ifdef __clang__
......@@ -13,6 +13,6 @@ inline namespace MIGRAPH_INLINE_NS {
#endif
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
......@@ -8,10 +8,10 @@
#include <iso646.h>
#endif
#include <migraph/requires.hpp>
#include <migraph/config.hpp>
#include <migraphx/requires.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
template <class... Ts>
......@@ -43,6 +43,6 @@ struct float_equal_fn
static constexpr float_equal_fn float_equal{};
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
......@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_RTGLIB_FUNCTIONAL_HPP
#include <utility>
#include <migraph/config.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
struct swallow
......@@ -132,6 +132,6 @@ auto fold(F f)
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
......@@ -2,10 +2,10 @@
#define MIGRAPH_GUARD_RTGLIB_FWD_CONV_BATCHNORM_REWRITE_HPP
#include <string>
#include <migraph/instruction_ref.hpp>
#include <migraph/config.hpp>
#include <migraphx/instruction_ref.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
struct program;
......@@ -20,6 +20,6 @@ struct fwd_conv_batchnorm_rewrite
};
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_GENERATE_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_GENERATE_HPP
#include <migraph/argument.hpp>
#include <migraph/literal.hpp>
#include <migraph/type_traits.hpp>
#include <migraph/config.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/type_traits.hpp>
#include <migraphx/config.hpp>
#include <random>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
template <class T, MIGRAPH_REQUIRES(is_floating_point<T>{})>
......@@ -78,7 +78,7 @@ struct xorshift_generator
};
template <class T>
std::vector<T> generate_tensor_data(const migraph::shape& s, unsigned long seed = 0)
std::vector<T> generate_tensor_data(const migraphx::shape& s, unsigned long seed = 0)
{
std::vector<T> result(s.elements());
std::generate(result.begin(), result.end(), xorshf96_generator<T>{seed});
......@@ -94,6 +94,6 @@ literal generate_literal(shape s, unsigned long seed = 0);
literal abs(literal l);
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
......@@ -9,9 +9,9 @@
#define MIGRAPH_GUARD_RTGLIB_HALF_HPP
#include <half.hpp>
#include <migraph/config.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
using half = half_float::half;
......@@ -34,6 +34,6 @@ template <class T>
using deduce = typename detail::deduce<T>::type;
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_INSTRUCTION_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_INSTRUCTION_HPP
#include <migraph/literal.hpp>
#include <migraph/shape.hpp>
#include <migraph/instruction_ref.hpp>
#include <migraph/operation.hpp>
#include <migraph/erase.hpp>
#include <migraph/config.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/shape.hpp>
#include <migraphx/instruction_ref.hpp>
#include <migraphx/operation.hpp>
#include <migraphx/erase.hpp>
#include <migraphx/config.hpp>
#include <string>
#include <utility>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
shape compute_shape(const operation& op, const std::vector<instruction_ref>& args);
......@@ -61,7 +61,7 @@ struct instruction
template <class T>
void remove_output(const T& ins)
{
migraph::erase(output, ins);
migraphx::erase(output, ins);
}
static void backreference(instruction_ref ref);
......@@ -91,17 +91,17 @@ struct instruction
literal lit;
};
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
namespace std {
template <>
struct hash<migraph::instruction_ref>
struct hash<migraphx::instruction_ref>
{
using argument_type = migraph::instruction_ref;
using argument_type = migraphx::instruction_ref;
using result_type = std::size_t;
result_type operator()(const argument_type& x) const noexcept
{
return std::hash<migraph::instruction*>{}(&*x);
return std::hash<migraphx::instruction*>{}(&*x);
}
};
......
......@@ -3,15 +3,15 @@
#include <list>
#include <functional>
#include <migraph/config.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
struct instruction;
using instruction_ref = std::list<instruction>::iterator;
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
......@@ -3,9 +3,9 @@
#include <cassert>
#include <type_traits>
#include <migraph/config.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
template <class T>
......@@ -40,6 +40,6 @@ iterator_for_range<T> iterator_for(T& x)
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_LITERAL_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_LITERAL_HPP
#include <migraph/shape.hpp>
#include <migraph/shape_for_each.hpp>
#include <migraph/argument.hpp>
#include <migraph/tensor_view.hpp>
#include <migraph/raw_data.hpp>
#include <migraph/make_shared_array.hpp>
#include <migraph/config.hpp>
#include <migraphx/shape.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/tensor_view.hpp>
#include <migraphx/raw_data.hpp>
#include <migraphx/make_shared_array.hpp>
#include <migraphx/config.hpp>
#include <memory>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
/**
......@@ -125,6 +125,6 @@ literal transform(literal l1, literal l2, F f)
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
......@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_MIGRAPHLIB_MAKE_SHARED_ARRAY_HPP
#include <memory>
#include <migraph/config.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
template <typename T>
......@@ -14,6 +14,6 @@ std::shared_ptr<T> make_shared_array(size_t size)
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
......@@ -3,9 +3,9 @@
#include <memory>
#include <type_traits>
#include <migraph/config.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
template <class F, F f> // NOLINT
......@@ -52,9 +52,9 @@ shared<T> share(T p)
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#define MIGRAPH_MANAGE_PTR(T, F) \
migraph::manage_ptr<std::remove_pointer_t<T>, decltype(&F), &F> // NOLINT
migraphx::manage_ptr<std::remove_pointer_t<T>, decltype(&F), &F> // NOLINT
#endif
#ifndef MIGRAPH_GUARD_RTGLIB_MATCHER_HPP
#define MIGRAPH_GUARD_RTGLIB_MATCHER_HPP
#include <migraph/functional.hpp>
#include <migraph/ranges.hpp>
#include <migraph/instruction.hpp>
#include <migraph/program.hpp>
#include <migraph/iterator_for.hpp>
#include <migraph/config.hpp>
#include <migraphx/functional.hpp>
#include <migraphx/ranges.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/program.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/config.hpp>
#include <unordered_map>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace match {
......@@ -169,22 +169,22 @@ basic_matcher<predicate_matcher<P>> make_basic_pred_matcher(P p)
}
/// This macro takes care of the boilerplate for defining a matcher
#define MIGRAPH_BASIC_MATCHER(name, ...) \
struct name##_m \
{ \
instruction_ref match(__VA_ARGS__) const; \
}; \
const constexpr auto name = migraph::match::basic_matcher<name##_m>{{}}; \
#define MIGRAPH_BASIC_MATCHER(name, ...) \
struct name##_m \
{ \
instruction_ref match(__VA_ARGS__) const; \
}; \
const constexpr auto name = migraphx::match::basic_matcher<name##_m>{{}}; \
inline instruction_ref name##_m::match(__VA_ARGS__) const
/// This macro takes care of the boilerplate for defining a predicate matcher
#define MIGRAPH_PRED_MATCHER(name, ...) \
struct name##_m \
{ \
bool operator()(__VA_ARGS__) const; \
}; \
const constexpr auto name = \
migraph::match::basic_matcher<migraph::match::predicate_matcher<name##_m>>{{}}; \
#define MIGRAPH_PRED_MATCHER(name, ...) \
struct name##_m \
{ \
bool operator()(__VA_ARGS__) const; \
}; \
const constexpr auto name = \
migraphx::match::basic_matcher<migraphx::match::predicate_matcher<name##_m>>{{}}; \
inline bool name##_m::operator()(__VA_ARGS__) const
struct matcher_result
......@@ -341,6 +341,6 @@ inline auto either_arg(std::size_t i, std::size_t j)
} // namespace match
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
......@@ -2,10 +2,10 @@
#define MIGRAPH_GUARD_RTGLIB_MEMORY_COLORING_HPP
#include <string>
#include <migraph/instruction_ref.hpp>
#include <migraph/config.hpp>
#include <migraphx/instruction_ref.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
struct program;
......@@ -21,6 +21,6 @@ struct memory_coloring
};
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_ONNX_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_ONNX_HPP
#include <migraph/program.hpp>
#include <migraph/config.hpp>
#include <migraphx/program.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
/// Create a program from an onnx file
program parse_onnx(const std::string& name);
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
......@@ -7,15 +7,15 @@
#include <memory>
#include <type_traits>
#include <utility>
#include <migraph/shape.hpp>
#include <migraph/reflect.hpp>
#include <migraph/streamutils.hpp>
#include <migraph/argument.hpp>
#include <migraph/context.hpp>
#include <migraph/auto_any_cast.hpp>
#include <migraph/config.hpp>
namespace migraph {
#include <migraphx/shape.hpp>
#include <migraphx/reflect.hpp>
#include <migraphx/streamutils.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/context.hpp>
#include <migraphx/auto_any_cast.hpp>
#include <migraphx/config.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
#ifdef DOXYGEN
......@@ -308,13 +308,13 @@ struct operation
std::ostream& operator_shift_left(std::ostream& os) const override
{
using migraph::operation_stream::operator<<;
using migraphx::operation_stream::operator<<;
return os << private_detail_te_value;
}
bool operator==(const operation& y) const override
{
using migraph::operation_equal::operator==;
using migraphx::operation_equal::operator==;
return private_detail_te_value == y;
}
......@@ -388,6 +388,6 @@ inline bool operator!=(const operation& x, const operation& y) { return !(x == y
#endif
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
......@@ -2,15 +2,15 @@
#define MIGRAPH_GUARD_OPERATORS_HPP
#include <array>
#include <migraph/operation.hpp>
#include <migraph/check_shapes.hpp>
#include <migraph/stringutils.hpp>
#include <migraph/streamutils.hpp>
#include <migraph/config.hpp>
#include <migraphx/operation.hpp>
#include <migraphx/check_shapes.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/streamutils.hpp>
#include <migraphx/config.hpp>
#include <cmath>
#include <utility>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace op {
......@@ -905,6 +905,6 @@ struct outline
} // namespace op
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
......@@ -7,9 +7,9 @@
#include <memory>
#include <type_traits>
#include <utility>
#include <migraph/config.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
struct program;
......@@ -219,6 +219,6 @@ inline const ValueType& any_cast(const pass& x)
#endif
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // 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