Commit 4c031df7 authored by wsttiger's avatar wsttiger
Browse files

Fixed conflicts

parents d32653a5 ed5f9897
......@@ -2,8 +2,10 @@
#define MIGRAPH_GUARD_RTGLIB_CONSTANT_PROPAGATE_HPP
#include <string>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct program;
......@@ -13,6 +15,7 @@ struct constant_propagate
void apply(program& p) const;
};
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -7,8 +7,10 @@
#include <memory>
#include <type_traits>
#include <utility>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
#ifdef DOXYGEN
......@@ -203,6 +205,7 @@ inline const ValueType& any_cast(const context& x)
#endif
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -3,8 +3,10 @@
#include <string>
#include <migraph/instruction_ref.hpp>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct program;
......@@ -14,6 +16,7 @@ struct dead_code_elimination
void apply(program& p) const;
};
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_DFOR_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_DFOR_HPP
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
// Multidimensional for loop
inline auto dfor()
......@@ -20,6 +23,7 @@ auto dfor(T x, Ts... xs)
};
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -3,8 +3,11 @@
#include <string>
#include <migraph/instruction_ref.hpp>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct program;
struct eliminate_allocation
......@@ -14,6 +17,8 @@ struct eliminate_allocation
std::string name() const { return "eliminate_allocation"; }
void apply(program& p) const;
};
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -4,8 +4,10 @@
#include <string>
#include <migraph/instruction_ref.hpp>
#include <migraph/concat_opt.hpp>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct program;
......@@ -16,6 +18,7 @@ struct eliminate_concat
void apply(program& p) const;
};
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -3,8 +3,10 @@
#include <string>
#include <migraph/instruction_ref.hpp>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct program;
......@@ -14,6 +16,7 @@ struct eliminate_contiguous
void apply(program& p) const;
};
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -3,8 +3,10 @@
#include <vector>
#include <string>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
// Declare a cached environment variable
#define MIGRAPH_DECLARE_ENV_VAR(x) \
......@@ -31,6 +33,7 @@ bool disabled(T)
return result;
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -2,8 +2,10 @@
#define MIGRAPH_GUARD_ERASE_HPP
#include <algorithm>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
/**
* @brief Erase all elements from a container
......@@ -31,6 +33,7 @@ auto erase_if(R&& r, P&& pred)
return r.erase(std::remove_if(r.begin(), r.end(), pred), r.end());
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -4,8 +4,10 @@
#include <exception>
#include <stdexcept>
#include <string>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
/// Represents exceptions that can be thrown by migraphlib
struct exception : std::runtime_error
......@@ -44,6 +46,7 @@ inline std::string make_source_context(const std::string& file, int line)
#define MIGRAPH_THROW(...) \
throw migraph::make_exception(migraph::make_source_context(__FILE__, __LINE__), __VA_ARGS__)
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
#ifndef MIGRAPH_GUARD_FALLTHROUGH_HPP
#define MIGRAPH_GUARD_FALLTHROUGH_HPP
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
#ifdef __clang__
#define MIGRAPH_FALLTHROUGH [[clang::fallthrough]]
......@@ -9,6 +12,7 @@ namespace migraph {
#define MIGRAPH_FALLTHROUGH
#endif
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -9,8 +9,10 @@
#endif
#include <migraph/requires.hpp>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
template <class... Ts>
using common_type = typename std::common_type<Ts...>::type;
......@@ -40,6 +42,7 @@ struct float_equal_fn
static constexpr float_equal_fn float_equal{};
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -2,8 +2,10 @@
#define MIGRAPH_GUARD_RTGLIB_FUNCTIONAL_HPP
#include <utility>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct swallow
{
......@@ -129,6 +131,7 @@ auto fold(F f)
return [=](auto&&... xs) { return fold_impl(f, std::forward<decltype(xs)>(xs)...); };
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -3,8 +3,10 @@
#include <string>
#include <migraph/instruction_ref.hpp>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct program;
......@@ -14,6 +16,7 @@ struct fwd_conv_batchnorm_rewrite
void apply(program& p) const;
};
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -4,9 +4,11 @@
#include <migraph/argument.hpp>
#include <migraph/literal.hpp>
#include <migraph/type_traits.hpp>
#include <migraph/config.hpp>
#include <random>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
template <class T, MIGRAPH_REQUIRES(is_floating_point<T>{})>
constexpr T normalize(unsigned long z)
......@@ -91,6 +93,7 @@ literal generate_literal(shape s, unsigned long seed = 0);
literal abs(literal l);
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -9,8 +9,10 @@
#define MIGRAPH_GUARD_RTGLIB_HALF_HPP
#include <half.hpp>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
using half = half_float::half;
......@@ -31,6 +33,7 @@ struct deduce<half_float::detail::expr>
template <class T>
using deduce = typename detail::deduce<T>::type;
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -6,10 +6,12 @@
#include <migraph/instruction_ref.hpp>
#include <migraph/operation.hpp>
#include <migraph/erase.hpp>
#include <migraph/config.hpp>
#include <string>
#include <utility>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
shape compute_shape(const operation& op, const std::vector<instruction_ref>& args);
......@@ -88,6 +90,7 @@ struct instruction
std::vector<instruction_ref> arguments;
literal lit;
};
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
namespace std {
......@@ -101,6 +104,7 @@ struct hash<migraph::instruction_ref>
return std::hash<migraph::instruction*>{}(&*x);
}
};
} // namespace std
#endif
......@@ -3,12 +3,15 @@
#include <list>
#include <functional>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
struct instruction;
using instruction_ref = std::list<instruction>::iterator;
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -3,8 +3,10 @@
#include <cassert>
#include <type_traits>
#include <migraph/config.hpp>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
template <class T>
struct iterator_for_range
......@@ -37,6 +39,7 @@ iterator_for_range<T> iterator_for(T& x)
return {&x};
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#endif
......@@ -7,10 +7,12 @@
#include <migraph/tensor_view.hpp>
#include <migraph/raw_data.hpp>
#include <migraph/make_shared_array.hpp>
#include <migraph/config.hpp>
#include <memory>
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
/**
* @brief Represents a raw literal
......@@ -122,6 +124,7 @@ literal transform(literal l1, literal l2, F f)
return result;
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
#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