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,14 +2,14 @@ ...@@ -2,14 +2,14 @@
#ifndef MIGRAPH_GUARD_PASS_CONFIG_HPP #ifndef MIGRAPH_GUARD_PASS_CONFIG_HPP
#define MIGRAPH_GUARD_PASS_CONFIG_HPP #define MIGRAPH_GUARD_PASS_CONFIG_HPP
#include <migraph/env.hpp> #include <migraphx/env.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
MIGRAPH_DECLARE_ENV_VAR(MIGRAPH_DISABLE_MEMORY_COLORING) MIGRAPH_DECLARE_ENV_VAR(MIGRAPH_DISABLE_MEMORY_COLORING)
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif // MIGRAPH_GUARD_PASS_CONFIG_HPP #endif // MIGRAPH_GUARD_PASS_CONFIG_HPP
...@@ -3,17 +3,17 @@ ...@@ -3,17 +3,17 @@
#include <list> #include <list>
#include <unordered_map> #include <unordered_map>
#include <migraph/operation.hpp> #include <migraphx/operation.hpp>
#include <migraph/literal.hpp> #include <migraphx/literal.hpp>
#include <migraph/builtin.hpp> #include <migraphx/builtin.hpp>
#include <migraph/instruction_ref.hpp> #include <migraphx/instruction_ref.hpp>
#include <migraph/target.hpp> #include <migraphx/target.hpp>
#include <migraph/tracer.hpp> #include <migraphx/tracer.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
#include <algorithm> #include <algorithm>
#include <iostream> #include <iostream>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
struct program_impl; struct program_impl;
...@@ -110,6 +110,6 @@ struct program ...@@ -110,6 +110,6 @@ struct program
}; };
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
#include <algorithm> #include <algorithm>
#include <initializer_list> #include <initializer_list>
#include <migraph/rank.hpp> #include <migraphx/rank.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace detail { namespace detail {
...@@ -107,6 +107,6 @@ iterator_range<Iterator> range(std::pair<Iterator, Iterator> p) ...@@ -107,6 +107,6 @@ iterator_range<Iterator> range(std::pair<Iterator, Iterator> p)
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
#ifndef MIGRAPH_GUARD_RTGLIB_RANK_HPP #ifndef MIGRAPH_GUARD_RTGLIB_RANK_HPP
#define MIGRAPH_GUARD_RTGLIB_RANK_HPP #define MIGRAPH_GUARD_RTGLIB_RANK_HPP
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
template <int N> template <int N>
...@@ -17,6 +17,6 @@ struct rank<0> ...@@ -17,6 +17,6 @@ struct rank<0>
}; };
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
#ifndef MIGRAPH_GUARD_RAW_DATA_HPP #ifndef MIGRAPH_GUARD_RAW_DATA_HPP
#define MIGRAPH_GUARD_RAW_DATA_HPP #define MIGRAPH_GUARD_RAW_DATA_HPP
#include <migraph/tensor_view.hpp> #include <migraphx/tensor_view.hpp>
#include <migraph/requires.hpp> #include <migraphx/requires.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
struct raw_data_base struct raw_data_base
...@@ -104,7 +104,7 @@ struct raw_data : raw_data_base ...@@ -104,7 +104,7 @@ struct raw_data : raw_data_base
bool matches() const bool matches() const
{ {
return is_data_ptr<T>{} || return is_data_ptr<T>{} ||
self->get_shape().type() == migraph::shape::get_type<get_data_type<T>>{}; self->get_shape().type() == migraphx::shape::get_type<get_data_type<T>>{};
} }
template <class T> template <class T>
...@@ -125,7 +125,7 @@ struct raw_data : raw_data_base ...@@ -125,7 +125,7 @@ struct raw_data : raw_data_base
{ {
auto&& s = static_cast<const Derived&>(*this).get_shape(); auto&& s = static_cast<const Derived&>(*this).get_shape();
auto&& buffer = static_cast<const Derived&>(*this).data(); auto&& buffer = static_cast<const Derived&>(*this).data();
if(s.type() != migraph::shape::get_type<T>{}) if(s.type() != migraphx::shape::get_type<T>{})
MIGRAPH_THROW("Incorrect data type for raw data"); MIGRAPH_THROW("Incorrect data type for raw data");
return make_view(s, reinterpret_cast<T*>(buffer)); return make_view(s, reinterpret_cast<T*>(buffer));
} }
...@@ -136,7 +136,7 @@ struct raw_data : raw_data_base ...@@ -136,7 +136,7 @@ struct raw_data : raw_data_base
{ {
auto&& s = static_cast<const Derived&>(*this).get_shape(); auto&& s = static_cast<const Derived&>(*this).get_shape();
auto&& buffer = static_cast<const Derived&>(*this).data(); auto&& buffer = static_cast<const Derived&>(*this).data();
assert(s.type() == migraph::shape::get_type<T>{}); assert(s.type() == migraphx::shape::get_type<T>{});
return reinterpret_cast<T*>(buffer); return reinterpret_cast<T*>(buffer);
} }
}; };
...@@ -206,6 +206,6 @@ auto visit_all(T&& x, Ts&&... xs) ...@@ -206,6 +206,6 @@ auto visit_all(T&& x, Ts&&... xs)
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
#ifndef MIGRAPH_GUARD_RTGLIB_REFLECT_HPP #ifndef MIGRAPH_GUARD_RTGLIB_REFLECT_HPP
#define MIGRAPH_GUARD_RTGLIB_REFLECT_HPP #define MIGRAPH_GUARD_RTGLIB_REFLECT_HPP
#include <migraph/functional.hpp> #include <migraphx/functional.hpp>
#include <migraph/rank.hpp> #include <migraphx/rank.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
#include <functional> #include <functional>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace detail { namespace detail {
...@@ -48,6 +48,6 @@ void reflect_each(T& x, F f) ...@@ -48,6 +48,6 @@ void reflect_each(T& x, F f)
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_MIGRAPHLIB_REQUIRES_HPP #define MIGRAPH_GUARD_MIGRAPHLIB_REQUIRES_HPP
#include <type_traits> #include <type_traits>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
template <bool... Bs> template <bool... Bs>
...@@ -32,21 +32,21 @@ struct requires_enum ...@@ -32,21 +32,21 @@ struct requires_enum
#if 0 #if 0
// TODO: This currently crashed on clang // TODO: This currently crashed on clang
#define MIGRAPH_REQUIRES(...) \ #define MIGRAPH_REQUIRES(...) \
typename migraph::requires_enum<__LINE__>::e MIGRAPH_REQUIRES_CAT( \ typename migraphx::requires_enum<__LINE__>::e MIGRAPH_REQUIRES_CAT( \
PrivateRequires, \ PrivateRequires, \
__LINE__) = migraph::requires_enum<__LINE__>::a, \ __LINE__) = migraphx::requires_enum<__LINE__>::a, \
class = typename std::enable_if<and_<__VA_ARGS__, \ class = typename std::enable_if<and_<__VA_ARGS__, \
MIGRAPH_REQUIRES_CAT(PrivateRequires, __LINE__) == \ MIGRAPH_REQUIRES_CAT(PrivateRequires, __LINE__) == \
migraph::requires_enum<__LINE__>::a>{}>::type migraphx::requires_enum<__LINE__>::a>{}>::type
#else #else
#define MIGRAPH_REQUIRES(...) \ #define MIGRAPH_REQUIRES(...) \
typename migraph::requires_enum<__LINE__>::e MIGRAPH_REQUIRES_CAT( \ typename migraphx::requires_enum<__LINE__>::e MIGRAPH_REQUIRES_CAT( \
PrivateRequires, __LINE__) = migraph::requires_enum<__LINE__>::a, \ PrivateRequires, __LINE__) = migraphx::requires_enum<__LINE__>::a, \
class = typename std::enable_if<and_<__VA_ARGS__>{}>::type class = typename std::enable_if<and_<__VA_ARGS__>{}>::type
#endif #endif
#endif #endif
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
#include <numeric> #include <numeric>
#include <memory> #include <memory>
#include <migraph/errors.hpp> #include <migraphx/errors.hpp>
#include <migraph/half.hpp> #include <migraphx/half.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
struct shape_impl; struct shape_impl;
...@@ -164,6 +164,6 @@ struct shape ...@@ -164,6 +164,6 @@ struct shape
}; };
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_SHAPE_FOR_EACH_HPP #ifndef MIGRAPH_GUARD_MIGRAPHLIB_SHAPE_FOR_EACH_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_SHAPE_FOR_EACH_HPP #define MIGRAPH_GUARD_MIGRAPHLIB_SHAPE_FOR_EACH_HPP
#include <migraph/shape.hpp> #include <migraphx/shape.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
#include <algorithm> #include <algorithm>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
template <class F> template <class F>
void shape_for_each(const migraph::shape& s, F f) void shape_for_each(const migraphx::shape& s, F f)
{ {
// Ensure calls to f use const ref to vector // Ensure calls to f use const ref to vector
auto call = [&f](const std::vector<std::size_t>& i) { f(i); }; auto call = [&f](const std::vector<std::size_t>& i) { f(i); };
...@@ -29,6 +29,6 @@ void shape_for_each(const migraph::shape& s, F f) ...@@ -29,6 +29,6 @@ void shape_for_each(const migraph::shape& s, F f)
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_RTGLIB_SIMPLIFY_ALGEBRA_HPP #define MIGRAPH_GUARD_RTGLIB_SIMPLIFY_ALGEBRA_HPP
#include <string> #include <string>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
struct program; struct program;
...@@ -19,6 +19,6 @@ struct simplify_algebra ...@@ -19,6 +19,6 @@ struct simplify_algebra
}; };
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
#define MIGRAPH_GUARD_RTGLIB_SIMPLIFY_RESHAPES_HPP #define MIGRAPH_GUARD_RTGLIB_SIMPLIFY_RESHAPES_HPP
#include <string> #include <string>
#include <migraph/instruction_ref.hpp> #include <migraphx/instruction_ref.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
struct program; struct program;
...@@ -20,6 +20,6 @@ struct simplify_reshapes ...@@ -20,6 +20,6 @@ struct simplify_reshapes
}; };
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
#include <ostream> #include <ostream>
#include <algorithm> #include <algorithm>
#include <migraph/rank.hpp> #include <migraphx/rank.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
template <class T> template <class T>
...@@ -57,6 +57,6 @@ void stream_write_value(std::ostream& os, const T& x) ...@@ -57,6 +57,6 @@ void stream_write_value(std::ostream& os, const T& x)
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
#include <numeric> #include <numeric>
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
inline std::string inline std::string
...@@ -88,6 +88,6 @@ inline std::string to_string(const T& x) ...@@ -88,6 +88,6 @@ inline std::string to_string(const T& x)
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
#include <type_traits> #include <type_traits>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <migraph/context.hpp> #include <migraphx/context.hpp>
#include <migraph/pass.hpp> #include <migraphx/pass.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
#ifdef DOXYGEN #ifdef DOXYGEN
...@@ -245,6 +245,6 @@ inline const ValueType& any_cast(const target& x) ...@@ -245,6 +245,6 @@ inline const ValueType& any_cast(const target& x)
#endif #endif
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
#ifndef MIGRAPH_GUARD_TENSOR_VIEW_HPP #ifndef MIGRAPH_GUARD_TENSOR_VIEW_HPP
#define MIGRAPH_GUARD_TENSOR_VIEW_HPP #define MIGRAPH_GUARD_TENSOR_VIEW_HPP
#include <migraph/shape.hpp> #include <migraphx/shape.hpp>
#include <migraph/float_equal.hpp> #include <migraphx/float_equal.hpp>
#include <migraph/requires.hpp> #include <migraphx/requires.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
#include <iostream> #include <iostream>
#include <utility> #include <utility>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
template <class T> template <class T>
...@@ -170,6 +170,6 @@ tensor_view<T> make_view(shape s, T* data) ...@@ -170,6 +170,6 @@ tensor_view<T> make_view(shape s, T* data)
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_RTGLIB_TIME_HPP #define MIGRAPH_GUARD_RTGLIB_TIME_HPP
#include <chrono> #include <chrono>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
template <class Duration, class F> template <class Duration, class F>
...@@ -17,6 +17,6 @@ auto time(F f) ...@@ -17,6 +17,6 @@ auto time(F f)
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
#define MIGRAPH_GUARD_RTGLIB_TRACER_HPP #define MIGRAPH_GUARD_RTGLIB_TRACER_HPP
#include <ostream> #include <ostream>
#include <migraph/functional.hpp> #include <migraphx/functional.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
struct tracer struct tracer
...@@ -31,6 +31,6 @@ struct tracer ...@@ -31,6 +31,6 @@ struct tracer
}; };
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_RTGLIB_TYPE_NAME_HPP #define MIGRAPH_GUARD_RTGLIB_TYPE_NAME_HPP
#include <string> #include <string>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
template <class PrivateMigraphTypeNameProbe> template <class PrivateMigraphTypeNameProbe>
...@@ -38,10 +38,10 @@ const std::string& get_type_name() ...@@ -38,10 +38,10 @@ const std::string& get_type_name()
template <class T> template <class T>
const std::string& get_type_name(const T&) const std::string& get_type_name(const T&)
{ {
return migraph::get_type_name<T>(); return migraphx::get_type_name<T>();
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
#define MIGRAPH_GUARD_RTGLIB_TYPE_TRAITS_HPP #define MIGRAPH_GUARD_RTGLIB_TYPE_TRAITS_HPP
#include <type_traits> #include <type_traits>
#include <migraph/half.hpp> #include <migraphx/half.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
#define MIGRAPH_DETAIL_EXTEND_TRAIT_FOR(trait, T) \ #define MIGRAPH_DETAIL_EXTEND_TRAIT_FOR(trait, T) \
...@@ -31,6 +31,6 @@ MIGRAPH_DETAIL_EXTEND_TRAIT_FOR(is_signed, half) ...@@ -31,6 +31,6 @@ MIGRAPH_DETAIL_EXTEND_TRAIT_FOR(is_signed, half)
MIGRAPH_DETAIL_EXTEND_TRAIT_FOR(is_arithmetic, half) MIGRAPH_DETAIL_EXTEND_TRAIT_FOR(is_arithmetic, half)
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
#include <iostream> #include <iostream>
#include <numeric> #include <numeric>
#include <migraph/float_equal.hpp> #include <migraphx/float_equal.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
// Compute the value of a range // Compute the value of a range
...@@ -174,5 +174,5 @@ bool verify_range(R1&& r1, R2&& r2, double tolerance = 80, double* out_error = n ...@@ -174,5 +174,5 @@ bool verify_range(R1&& r1, R2&& r2, double tolerance = 80, double* out_error = n
} }
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // 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