Commit bb390b65 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

Merge branch 'activationOperators' into addLogExpOperators

parents adfa1a93 682ad83a
......@@ -5,7 +5,7 @@
#include <utility>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
shape miopen_batch_norm_inference::compute_shape(const std::vector<shape>& inputs) const
......@@ -43,5 +43,5 @@ argument miopen_batch_norm_inference::compute(context& ctx,
}
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -6,7 +6,7 @@
#include <utility>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
shape hip_concat::compute_shape(std::vector<shape> inputs) const
......@@ -24,5 +24,5 @@ argument hip_concat::compute(context& ctx,
}
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -5,7 +5,7 @@
#include <utility>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
shape miopen_contiguous::compute_shape(const std::vector<shape>& inputs) const
......@@ -25,5 +25,5 @@ argument miopen_contiguous::compute(context& ctx,
}
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -5,7 +5,7 @@
#include <utility>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
shape miopen_convolution::compute_shape(const std::vector<shape>& inputs) const
......@@ -82,5 +82,5 @@ shape miopen_convolution::compile(context& ctx,
}
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -6,7 +6,7 @@
#include <utility>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
shape hip_cos::compute_shape(const std::vector<shape>& inputs) const
......@@ -22,5 +22,5 @@ argument hip_cos::compute(context& ctx, const shape&, const std::vector<argument
}
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -6,7 +6,7 @@
#include <utility>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
shape hip_cosh::compute_shape(const std::vector<shape>& inputs) const
......@@ -22,5 +22,5 @@ argument hip_cosh::compute(context& ctx, const shape&, const std::vector<argumen
}
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -3,7 +3,7 @@
#include <migraphx/gpu/device/types.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
namespace device {
......@@ -14,5 +14,5 @@ void acos(hipStream_t stream, const argument& result, const argument& arg)
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -2,7 +2,7 @@
#include <migraphx/gpu/device/nary.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
namespace device {
......@@ -22,5 +22,5 @@ void add(hipStream_t stream,
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -2,7 +2,7 @@
#include <migraphx/gpu/device/nary.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
namespace device {
......@@ -27,5 +27,5 @@ void add_relu(hipStream_t stream,
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -3,7 +3,7 @@
#include <migraphx/gpu/device/types.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
namespace device {
......@@ -14,5 +14,5 @@ void asin(hipStream_t stream, const argument& result, const argument& arg)
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -3,7 +3,7 @@
#include <migraphx/gpu/device/types.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
namespace device {
......@@ -14,5 +14,5 @@ void atan(hipStream_t stream, const argument& result, const argument& arg)
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -5,7 +5,7 @@
#include <migraphx/gpu/device/launch.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
namespace device {
......@@ -34,5 +34,5 @@ argument concat(hipStream_t stream,
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -3,7 +3,7 @@
#include <migraphx/gpu/device/nary.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
namespace device {
......@@ -14,5 +14,5 @@ void contiguous(hipStream_t stream, argument result, argument arg)
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -3,7 +3,7 @@
#include <migraphx/gpu/device/types.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
namespace device {
......@@ -14,5 +14,5 @@ void cos(hipStream_t stream, const argument& result, const argument& arg)
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
......@@ -3,7 +3,7 @@
#include <migraphx/gpu/device/types.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
namespace device {
......@@ -14,5 +14,5 @@ void cosh(hipStream_t stream, const argument& result, const argument& arg)
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
#ifndef MIGRAPH_GUARD_RTGLIB_DEVICE_LAUNCH_HPP
#define MIGRAPH_GUARD_RTGLIB_DEVICE_LAUNCH_HPP
#ifndef MIGRAPHX_GUARD_RTGLIB_DEVICE_LAUNCH_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_LAUNCH_HPP
#include <hip/hip_runtime.h>
#include <migraphx/config.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
namespace device {
......@@ -53,14 +53,14 @@ inline auto gs_launch(hipStream_t stream, std::size_t n, std::size_t local = 102
// Workaround hcc's broken tile_static macro
#ifdef tile_static
#undef tile_static
#define MIGRAPH_DEVICE_SHARED __attribute__((tile_static))
#define MIGRAPHX_DEVICE_SHARED __attribute__((tile_static))
#else
#define MIGRAPH_DEVICE_SHARED __shared__
#define MIGRAPHX_DEVICE_SHARED __shared__
#endif
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
#endif
#ifndef MIGRAPH_GUARD_RTGLIB_DEVICE_NARY_HPP
#define MIGRAPH_GUARD_RTGLIB_DEVICE_NARY_HPP
#ifndef MIGRAPHX_GUARD_RTGLIB_DEVICE_NARY_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_NARY_HPP
#include <migraphx/gpu/device/tensor.hpp>
#include <migraphx/gpu/device/launch.hpp>
......@@ -9,7 +9,7 @@
#include <migraphx/config.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
namespace device {
......@@ -87,7 +87,7 @@ void trinary_broadcast_vec_impl(hipStream_t stream,
const std::size_t bdim_vec_len = bdim_len / vec_size;
launch(stream, nglobal, nlocal)([=](auto idx) __device__ {
MIGRAPH_DEVICE_SHARED vec4<type> buffer[2048 / vec_size];
MIGRAPHX_DEVICE_SHARED vec4<type> buffer[2048 / vec_size];
// Load bias into LDS
for(size_t i = idx.local; i < bdim_vec_len; i += nlocal)
{
......@@ -144,7 +144,7 @@ void trinary_broadcast_impl(hipStream_t stream,
const std::size_t n = output.size();
launch(stream, nglobal, nlocal)([=](auto idx) __device__ {
MIGRAPH_DEVICE_SHARED type buffer[2048];
MIGRAPHX_DEVICE_SHARED type buffer[2048];
// Load bias into LDS
for(size_t i = idx.local; i < bdim_len; i += nlocal)
{
......@@ -192,7 +192,7 @@ void binary_broadcast_vec_impl(
const std::size_t bdim_vec_len = bdim_len / vec_size;
launch(stream, nglobal, nlocal)([=](auto idx) __device__ {
MIGRAPH_DEVICE_SHARED vec4<type> buffer[2048 / vec_size];
MIGRAPHX_DEVICE_SHARED vec4<type> buffer[2048 / vec_size];
// Load bias into LDS
for(size_t i = idx.local; i < bdim_vec_len; i += nlocal)
{
......@@ -243,7 +243,7 @@ void binary_broadcast_impl(
const std::size_t n = output.size();
launch(stream, nglobal, nlocal)([=](auto idx) __device__ {
MIGRAPH_DEVICE_SHARED type buffer[2048];
MIGRAPHX_DEVICE_SHARED type buffer[2048];
// Load bias into LDS
for(size_t i = idx.local; i < bdim_len; i += nlocal)
{
......@@ -396,7 +396,7 @@ inline auto nary(hipStream_t stream,
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
#endif
#ifndef MIGRAPH_GUARD_RTGLIB_DEAVICE_TENSOR_HPP
#define MIGRAPH_GUARD_RTGLIB_DEAVICE_TENSOR_HPP
#ifndef MIGRAPHX_GUARD_RTGLIB_DEAVICE_TENSOR_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEAVICE_TENSOR_HPP
#include <hip/hip_runtime.h>
#include <migraphx/functional.hpp>
#include <migraphx/config.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
namespace device {
......@@ -87,7 +87,7 @@ struct hip_tensor_descriptor
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
#endif
......@@ -5,14 +5,14 @@
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#ifndef MIGRAPH_GUARD_RTGLIB_GPU_DEVICE_TYPES_HPP
#define MIGRAPH_GUARD_RTGLIB_GPU_DEVICE_TYPES_HPP
#ifndef MIGRAPHX_GUARD_RTGLIB_GPU_DEVICE_TYPES_HPP
#define MIGRAPHX_GUARD_RTGLIB_GPU_DEVICE_TYPES_HPP
#include <migraphx/half.hpp>
#include <migraphx/config.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
namespace device {
......@@ -86,7 +86,7 @@ inline float to_hip_type(gpu_half x) { return x; }
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
#endif
......@@ -2,7 +2,7 @@
#include <migraphx/gpu/device/nary.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline namespace MIGRAPHX_INLINE_NS {
namespace gpu {
namespace device {
......@@ -22,5 +22,5 @@ void mul(hipStream_t stream,
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
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