Commit 7702c20d authored by Paul's avatar Paul
Browse files

Merge

parents c362e7fa 9afce86d
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2022 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MIGRAPHX_GUARD_OPERATORS_FMOD_HPP
#define MIGRAPHX_GUARD_OPERATORS_FMOD_HPP
#include <array>
#include <migraphx/op/binary.hpp>
#include <migraphx/check_shapes.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/streamutils.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp>
#include <cmath>
#include <utility>
#include <type_traits>
namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
namespace op {
struct fmod : binary<fmod>
{
std::string name() const { return "fmod"; }
value attributes() const
{
auto a = base_attributes();
a["commutative"] = false;
return a;
}
std::string point_function() const { return "fmod"; }
auto apply() const
{
return [](auto x, auto y) { return std::fmod(x, y); };
}
};
} // namespace op
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
#endif
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <migraphx/check_shapes.hpp> #include <migraphx/check_shapes.hpp>
#include <migraphx/shape_for_each.hpp> #include <migraphx/shape_for_each.hpp>
#include <migraphx/par_for.hpp> #include <migraphx/par_for.hpp>
#include <migraphx/argument.hpp>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
......
...@@ -26,10 +26,8 @@ ...@@ -26,10 +26,8 @@
#include "migraphx/errors.hpp" #include "migraphx/errors.hpp"
#include <migraphx/check_shapes.hpp> #include <migraphx/check_shapes.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/streamutils.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
#include <migraphx/argument.hpp>
#include <utility> #include <utility>
namespace migraphx { namespace migraphx {
......
...@@ -24,15 +24,8 @@ ...@@ -24,15 +24,8 @@
#ifndef MIGRAPHX_GUARD_OPERATORS_IDENTITY_HPP #ifndef MIGRAPHX_GUARD_OPERATORS_IDENTITY_HPP
#define MIGRAPHX_GUARD_OPERATORS_IDENTITY_HPP #define MIGRAPHX_GUARD_OPERATORS_IDENTITY_HPP
#include <array> #include <migraphx/op/unary.hpp>
#include <migraphx/check_shapes.hpp> #include <migraphx/argument.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/streamutils.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp>
#include <cmath>
#include <utility>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <array> #include <array>
#include <migraphx/check_shapes.hpp> #include <migraphx/check_shapes.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/functional.hpp> #include <migraphx/functional.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
#include <migraphx/module.hpp> #include <migraphx/module.hpp>
......
...@@ -24,15 +24,8 @@ ...@@ -24,15 +24,8 @@
#ifndef MIGRAPHX_GUARD_OPERATORS_LEAKY_RELU_HPP #ifndef MIGRAPHX_GUARD_OPERATORS_LEAKY_RELU_HPP
#define MIGRAPHX_GUARD_OPERATORS_LEAKY_RELU_HPP #define MIGRAPHX_GUARD_OPERATORS_LEAKY_RELU_HPP
#include <array>
#include <migraphx/check_shapes.hpp> #include <migraphx/check_shapes.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/streamutils.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
#include <cmath>
#include <utility>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
......
...@@ -24,10 +24,9 @@ ...@@ -24,10 +24,9 @@
#ifndef MIGRAPHX_GUARD_OPERATORS_LESS_HPP #ifndef MIGRAPHX_GUARD_OPERATORS_LESS_HPP
#define MIGRAPHX_GUARD_OPERATORS_LESS_HPP #define MIGRAPHX_GUARD_OPERATORS_LESS_HPP
#include <migraphx/op/binary.hpp>
#include <migraphx/operation.hpp>
#include <migraphx/check_shapes.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
#include <migraphx/op/binary.hpp>
#include <cmath>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
......
...@@ -24,14 +24,11 @@ ...@@ -24,14 +24,11 @@
#ifndef MIGRAPHX_GUARD_OPERATORS_LOAD_HPP #ifndef MIGRAPHX_GUARD_OPERATORS_LOAD_HPP
#define MIGRAPHX_GUARD_OPERATORS_LOAD_HPP #define MIGRAPHX_GUARD_OPERATORS_LOAD_HPP
#include <array>
#include <migraphx/check_shapes.hpp> #include <migraphx/check_shapes.hpp>
#include <migraphx/functional.hpp>
#include <migraphx/argument.hpp> #include <migraphx/argument.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
#include <migraphx/lifetime.hpp> #include <migraphx/lifetime.hpp>
#include <cmath> #include <migraphx/op/normalize_attribute.hpp>
#include <utility>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
......
...@@ -24,16 +24,9 @@ ...@@ -24,16 +24,9 @@
#ifndef MIGRAPHX_GUARD_OPERATORS_LOG_HPP #ifndef MIGRAPHX_GUARD_OPERATORS_LOG_HPP
#define MIGRAPHX_GUARD_OPERATORS_LOG_HPP #define MIGRAPHX_GUARD_OPERATORS_LOG_HPP
#include <array>
#include <migraphx/op/unary.hpp>
#include <migraphx/check_shapes.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/streamutils.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
#include <migraphx/op/unary.hpp>
#include <cmath> #include <cmath>
#include <utility>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
......
...@@ -24,10 +24,9 @@ ...@@ -24,10 +24,9 @@
#ifndef MIGRAPHX_GUARD_OPERATORS_LOGICAL_AND_HPP #ifndef MIGRAPHX_GUARD_OPERATORS_LOGICAL_AND_HPP
#define MIGRAPHX_GUARD_OPERATORS_LOGICAL_AND_HPP #define MIGRAPHX_GUARD_OPERATORS_LOGICAL_AND_HPP
#include <migraphx/op/binary.hpp>
#include <migraphx/operation.hpp>
#include <migraphx/check_shapes.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
#include <migraphx/op/binary.hpp>
#include <cmath>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
......
...@@ -24,10 +24,9 @@ ...@@ -24,10 +24,9 @@
#ifndef MIGRAPHX_GUARD_OPERATORS_LOGICAL_OR_HPP #ifndef MIGRAPHX_GUARD_OPERATORS_LOGICAL_OR_HPP
#define MIGRAPHX_GUARD_OPERATORS_LOGICAL_OR_HPP #define MIGRAPHX_GUARD_OPERATORS_LOGICAL_OR_HPP
#include <migraphx/op/binary.hpp>
#include <migraphx/operation.hpp>
#include <migraphx/check_shapes.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
#include <migraphx/op/binary.hpp>
#include <cmath>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
......
...@@ -24,10 +24,9 @@ ...@@ -24,10 +24,9 @@
#ifndef MIGRAPHX_GUARD_OPERATORS_LOGICAL_XOR_HPP #ifndef MIGRAPHX_GUARD_OPERATORS_LOGICAL_XOR_HPP
#define MIGRAPHX_GUARD_OPERATORS_LOGICAL_XOR_HPP #define MIGRAPHX_GUARD_OPERATORS_LOGICAL_XOR_HPP
#include <migraphx/op/binary.hpp>
#include <migraphx/operation.hpp>
#include <migraphx/check_shapes.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
#include <migraphx/op/binary.hpp>
#include <cmath>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#define MIGRAPHX_GUARD_OPERATORS_LOOP_HPP #define MIGRAPHX_GUARD_OPERATORS_LOOP_HPP
#include <migraphx/check_shapes.hpp> #include <migraphx/check_shapes.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/functional.hpp> #include <migraphx/functional.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
#include <migraphx/module.hpp> #include <migraphx/module.hpp>
......
...@@ -24,16 +24,9 @@ ...@@ -24,16 +24,9 @@
#ifndef MIGRAPHX_GUARD_OPERATORS_MAX_HPP #ifndef MIGRAPHX_GUARD_OPERATORS_MAX_HPP
#define MIGRAPHX_GUARD_OPERATORS_MAX_HPP #define MIGRAPHX_GUARD_OPERATORS_MAX_HPP
#include <array>
#include <migraphx/op/binary.hpp>
#include <migraphx/check_shapes.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/streamutils.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
#include <migraphx/op/binary.hpp>
#include <cmath> #include <cmath>
#include <utility>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
......
...@@ -24,16 +24,9 @@ ...@@ -24,16 +24,9 @@
#ifndef MIGRAPHX_GUARD_OPERATORS_MIN_HPP #ifndef MIGRAPHX_GUARD_OPERATORS_MIN_HPP
#define MIGRAPHX_GUARD_OPERATORS_MIN_HPP #define MIGRAPHX_GUARD_OPERATORS_MIN_HPP
#include <array>
#include <migraphx/op/binary.hpp>
#include <migraphx/check_shapes.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/streamutils.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
#include <migraphx/op/binary.hpp>
#include <cmath> #include <cmath>
#include <utility>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
......
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2022 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MIGRAPHX_GUARD_OPERATORS_MOD_HPP
#define MIGRAPHX_GUARD_OPERATORS_MOD_HPP
#include <array>
#include <migraphx/op/binary.hpp>
#include <migraphx/check_shapes.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/streamutils.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp>
#include <cmath>
#include <utility>
#include <type_traits>
namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
namespace op {
struct mod : binary<mod>
{
std::string name() const { return "mod"; }
value attributes() const
{
auto a = base_attributes();
a["commutative"] = false;
return a;
}
std::string point_function() const { return "mod"; }
auto apply() const
{
return [](auto x, auto y) { return std::fmod((std::remainder(x, y)) + y, y); };
}
};
} // namespace op
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
#endif
...@@ -24,16 +24,9 @@ ...@@ -24,16 +24,9 @@
#ifndef MIGRAPHX_GUARD_OPERATORS_MUL_HPP #ifndef MIGRAPHX_GUARD_OPERATORS_MUL_HPP
#define MIGRAPHX_GUARD_OPERATORS_MUL_HPP #define MIGRAPHX_GUARD_OPERATORS_MUL_HPP
#include <array>
#include <migraphx/op/binary.hpp>
#include <migraphx/check_shapes.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/streamutils.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
#include <migraphx/op/binary.hpp>
#include <cmath> #include <cmath>
#include <utility>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
......
...@@ -24,16 +24,9 @@ ...@@ -24,16 +24,9 @@
#ifndef MIGRAPHX_GUARD_OPERATORS_MULTIBROADCAST_HPP #ifndef MIGRAPHX_GUARD_OPERATORS_MULTIBROADCAST_HPP
#define MIGRAPHX_GUARD_OPERATORS_MULTIBROADCAST_HPP #define MIGRAPHX_GUARD_OPERATORS_MULTIBROADCAST_HPP
#include <array>
#include <migraphx/check_shapes.hpp> #include <migraphx/check_shapes.hpp>
#include <migraphx/stringutils.hpp> #include <migraphx/argument.hpp>
#include <migraphx/streamutils.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
#include <migraphx/lifetime.hpp>
#include <cmath>
#include <utility>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
......
...@@ -24,9 +24,10 @@ ...@@ -24,9 +24,10 @@
#ifndef MIGRAPHX_GUARD_OPERATORS_MULTINOMIAL_HPP #ifndef MIGRAPHX_GUARD_OPERATORS_MULTINOMIAL_HPP
#define MIGRAPHX_GUARD_OPERATORS_MULTINOMIAL_HPP #define MIGRAPHX_GUARD_OPERATORS_MULTINOMIAL_HPP
#include <migraphx/operation.hpp>
#include <migraphx/check_shapes.hpp> #include <migraphx/check_shapes.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/par_for.hpp> #include <migraphx/par_for.hpp>
#include <migraphx/reflect.hpp>
#include <random> #include <random>
namespace migraphx { namespace migraphx {
......
...@@ -24,16 +24,9 @@ ...@@ -24,16 +24,9 @@
#ifndef MIGRAPHX_GUARD_OPERATORS_NEG_HPP #ifndef MIGRAPHX_GUARD_OPERATORS_NEG_HPP
#define MIGRAPHX_GUARD_OPERATORS_NEG_HPP #define MIGRAPHX_GUARD_OPERATORS_NEG_HPP
#include <array>
#include <migraphx/op/unary.hpp>
#include <migraphx/check_shapes.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/streamutils.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
#include <migraphx/op/unary.hpp>
#include <cmath> #include <cmath>
#include <utility>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
......
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