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
#ifndef MIGRAPH_GUARD_RTGLIB_LEAKY_RELU_HPP #ifndef MIGRAPH_GUARD_RTGLIB_LEAKY_RELU_HPP
#define MIGRAPH_GUARD_RTGLIB_LEAKY_RELU_HPP #define MIGRAPH_GUARD_RTGLIB_LEAKY_RELU_HPP
#include <migraph/gpu/lowering.hpp> #include <migraphx/gpu/lowering.hpp>
#include <migraph/manage_ptr.hpp> #include <migraphx/manage_ptr.hpp>
#include <migraph/instruction.hpp> #include <migraphx/instruction.hpp>
#include <migraph/operators.hpp> #include <migraphx/operators.hpp>
#include <migraph/generate.hpp> #include <migraphx/generate.hpp>
#include <migraph/shape_for_each.hpp> #include <migraphx/shape_for_each.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
#include <migraph/gpu/miopen.hpp> #include <migraphx/gpu/miopen.hpp>
#include <migraph/gpu/hip.hpp> #include <migraphx/gpu/hip.hpp>
#include <migraph/dfor.hpp> #include <migraphx/dfor.hpp>
#include <migraph/gpu/device/contiguous.hpp> #include <migraphx/gpu/device/contiguous.hpp>
#include <migraph/gpu/device/add.hpp> #include <migraphx/gpu/device/add.hpp>
#include <migraph/iterator_for.hpp> #include <migraphx/iterator_for.hpp>
#include <migraph/gpu/rocblas.hpp> #include <migraphx/gpu/rocblas.hpp>
#include <migraph/gpu/context.hpp> #include <migraphx/gpu/context.hpp>
#include <utility> #include <utility>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -34,6 +34,6 @@ struct miopen_leaky_relu ...@@ -34,6 +34,6 @@ struct miopen_leaky_relu
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
#ifndef MIGRAPH_GUARD_RTGLIB_MIOPEN_LOWERING_HPP #ifndef MIGRAPH_GUARD_RTGLIB_MIOPEN_LOWERING_HPP
#define MIGRAPH_GUARD_RTGLIB_MIOPEN_LOWERING_HPP #define MIGRAPH_GUARD_RTGLIB_MIOPEN_LOWERING_HPP
#include <migraph/program.hpp> #include <migraphx/program.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
#include <migraph/gpu/context.hpp> #include <migraphx/gpu/context.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -18,6 +18,6 @@ struct lowering ...@@ -18,6 +18,6 @@ struct lowering
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_MIOPEN_HPP #ifndef MIGRAPH_GUARD_MIGRAPHLIB_MIOPEN_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_MIOPEN_HPP #define MIGRAPH_GUARD_MIGRAPHLIB_MIOPEN_HPP
#include <migraph/manage_ptr.hpp> #include <migraphx/manage_ptr.hpp>
#include <migraph/operators.hpp> #include <migraphx/operators.hpp>
#include <miopen/miopen.h> #include <miopen/miopen.h>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -34,7 +34,7 @@ Result make_obj(F f, Ts... xs) ...@@ -34,7 +34,7 @@ Result make_obj(F f, Ts... xs)
return r; return r;
} }
inline tensor_descriptor make_tensor(const migraph::shape& s) inline tensor_descriptor make_tensor(const migraphx::shape& s)
{ {
auto t = make_obj<tensor_descriptor>(&miopenCreateTensorDescriptor); auto t = make_obj<tensor_descriptor>(&miopenCreateTensorDescriptor);
// Convert to ints // Convert to ints
...@@ -51,7 +51,7 @@ inline tensor_descriptor make_tensor(const migraph::shape& s) ...@@ -51,7 +51,7 @@ inline tensor_descriptor make_tensor(const migraph::shape& s)
return t; return t;
} }
inline convolution_descriptor make_conv(const migraph::op::convolution& op) inline convolution_descriptor make_conv(const migraphx::op::convolution& op)
{ {
auto c = make_obj<convolution_descriptor>(&miopenCreateConvolutionDescriptor); auto c = make_obj<convolution_descriptor>(&miopenCreateConvolutionDescriptor);
miopenInitConvolutionDescriptor(c.get(), miopenInitConvolutionDescriptor(c.get(),
...@@ -65,7 +65,7 @@ inline convolution_descriptor make_conv(const migraph::op::convolution& op) ...@@ -65,7 +65,7 @@ inline convolution_descriptor make_conv(const migraph::op::convolution& op)
return c; return c;
} }
inline pooling_descriptor make_pooling(const migraph::op::pooling& op) inline pooling_descriptor make_pooling(const migraphx::op::pooling& op)
{ {
miopenPoolingMode_t mode; miopenPoolingMode_t mode;
if(op.mode == "max") if(op.mode == "max")
...@@ -118,6 +118,6 @@ inline fused_operator_args make_fused_args() ...@@ -118,6 +118,6 @@ inline fused_operator_args make_fused_args()
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
#ifndef MIGRAPH_GUARD_RTGLIB_MUL_HPP #ifndef MIGRAPH_GUARD_RTGLIB_MUL_HPP
#define MIGRAPH_GUARD_RTGLIB_MUL_HPP #define MIGRAPH_GUARD_RTGLIB_MUL_HPP
#include <migraph/gpu/lowering.hpp> #include <migraphx/gpu/lowering.hpp>
#include <migraph/manage_ptr.hpp> #include <migraphx/manage_ptr.hpp>
#include <migraph/instruction.hpp> #include <migraphx/instruction.hpp>
#include <migraph/operators.hpp> #include <migraphx/operators.hpp>
#include <migraph/generate.hpp> #include <migraphx/generate.hpp>
#include <migraph/shape_for_each.hpp> #include <migraphx/shape_for_each.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
#include <migraph/gpu/miopen.hpp> #include <migraphx/gpu/miopen.hpp>
#include <migraph/gpu/hip.hpp> #include <migraphx/gpu/hip.hpp>
#include <migraph/dfor.hpp> #include <migraphx/dfor.hpp>
#include <migraph/gpu/device/contiguous.hpp> #include <migraphx/gpu/device/contiguous.hpp>
#include <migraph/gpu/device/mul.hpp> #include <migraphx/gpu/device/mul.hpp>
#include <migraph/iterator_for.hpp> #include <migraphx/iterator_for.hpp>
#include <migraph/gpu/rocblas.hpp> #include <migraphx/gpu/rocblas.hpp>
#include <migraph/gpu/context.hpp> #include <migraphx/gpu/context.hpp>
#include <utility> #include <utility>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -32,6 +32,6 @@ struct hip_mul ...@@ -32,6 +32,6 @@ struct hip_mul
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
#ifndef MIGRAPH_GUARD_RTGLIB_POOLING_HPP #ifndef MIGRAPH_GUARD_RTGLIB_POOLING_HPP
#define MIGRAPH_GUARD_RTGLIB_POOLING_HPP #define MIGRAPH_GUARD_RTGLIB_POOLING_HPP
#include <migraph/gpu/lowering.hpp> #include <migraphx/gpu/lowering.hpp>
#include <migraph/manage_ptr.hpp> #include <migraphx/manage_ptr.hpp>
#include <migraph/instruction.hpp> #include <migraphx/instruction.hpp>
#include <migraph/operators.hpp> #include <migraphx/operators.hpp>
#include <migraph/generate.hpp> #include <migraphx/generate.hpp>
#include <migraph/shape_for_each.hpp> #include <migraphx/shape_for_each.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
#include <migraph/gpu/miopen.hpp> #include <migraphx/gpu/miopen.hpp>
#include <migraph/gpu/hip.hpp> #include <migraphx/gpu/hip.hpp>
#include <migraph/dfor.hpp> #include <migraphx/dfor.hpp>
#include <migraph/gpu/device/contiguous.hpp> #include <migraphx/gpu/device/contiguous.hpp>
#include <migraph/gpu/device/add.hpp> #include <migraphx/gpu/device/add.hpp>
#include <migraph/iterator_for.hpp> #include <migraphx/iterator_for.hpp>
#include <migraph/gpu/rocblas.hpp> #include <migraphx/gpu/rocblas.hpp>
#include <migraph/gpu/context.hpp> #include <migraphx/gpu/context.hpp>
#include <utility> #include <utility>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -36,6 +36,6 @@ struct miopen_pooling ...@@ -36,6 +36,6 @@ struct miopen_pooling
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
#ifndef MIGRAPH_GUARD_RTGLIB_RELU_HPP #ifndef MIGRAPH_GUARD_RTGLIB_RELU_HPP
#define MIGRAPH_GUARD_RTGLIB_RELU_HPP #define MIGRAPH_GUARD_RTGLIB_RELU_HPP
#include <migraph/gpu/lowering.hpp> #include <migraphx/gpu/lowering.hpp>
#include <migraph/manage_ptr.hpp> #include <migraphx/manage_ptr.hpp>
#include <migraph/instruction.hpp> #include <migraphx/instruction.hpp>
#include <migraph/operators.hpp> #include <migraphx/operators.hpp>
#include <migraph/generate.hpp> #include <migraphx/generate.hpp>
#include <migraph/shape_for_each.hpp> #include <migraphx/shape_for_each.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
#include <migraph/gpu/miopen.hpp> #include <migraphx/gpu/miopen.hpp>
#include <migraph/gpu/hip.hpp> #include <migraphx/gpu/hip.hpp>
#include <migraph/dfor.hpp> #include <migraphx/dfor.hpp>
#include <migraph/gpu/device/contiguous.hpp> #include <migraphx/gpu/device/contiguous.hpp>
#include <migraph/gpu/device/add.hpp> #include <migraphx/gpu/device/add.hpp>
#include <migraph/iterator_for.hpp> #include <migraphx/iterator_for.hpp>
#include <migraph/gpu/rocblas.hpp> #include <migraphx/gpu/rocblas.hpp>
#include <migraph/gpu/context.hpp> #include <migraphx/gpu/context.hpp>
#include <utility> #include <utility>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -34,6 +34,6 @@ struct miopen_relu ...@@ -34,6 +34,6 @@ struct miopen_relu
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_ROCBLAS_HPP #ifndef MIGRAPH_GUARD_MIGRAPHLIB_ROCBLAS_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_ROCBLAS_HPP #define MIGRAPH_GUARD_MIGRAPHLIB_ROCBLAS_HPP
#include <migraph/manage_ptr.hpp> #include <migraphx/manage_ptr.hpp>
#include <migraph/operators.hpp> #include <migraphx/operators.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
#include <rocblas.h> #include <rocblas.h>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -17,6 +17,6 @@ rocblas_handle_ptr create_rocblas_handle_ptr(hipStream_t s); ...@@ -17,6 +17,6 @@ rocblas_handle_ptr create_rocblas_handle_ptr(hipStream_t s);
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
#ifndef MIGRAPH_GUARD_RTGLIB_SOFTMAX_HPP #ifndef MIGRAPH_GUARD_RTGLIB_SOFTMAX_HPP
#define MIGRAPH_GUARD_RTGLIB_SOFTMAX_HPP #define MIGRAPH_GUARD_RTGLIB_SOFTMAX_HPP
#include <migraph/gpu/lowering.hpp> #include <migraphx/gpu/lowering.hpp>
#include <migraph/manage_ptr.hpp> #include <migraphx/manage_ptr.hpp>
#include <migraph/instruction.hpp> #include <migraphx/instruction.hpp>
#include <migraph/operators.hpp> #include <migraphx/operators.hpp>
#include <migraph/generate.hpp> #include <migraphx/generate.hpp>
#include <migraph/shape_for_each.hpp> #include <migraphx/shape_for_each.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
#include <migraph/gpu/miopen.hpp> #include <migraphx/gpu/miopen.hpp>
#include <migraph/gpu/hip.hpp> #include <migraphx/gpu/hip.hpp>
#include <migraph/dfor.hpp> #include <migraphx/dfor.hpp>
#include <migraph/gpu/device/contiguous.hpp> #include <migraphx/gpu/device/contiguous.hpp>
#include <migraph/gpu/device/add.hpp> #include <migraphx/gpu/device/add.hpp>
#include <migraph/iterator_for.hpp> #include <migraphx/iterator_for.hpp>
#include <migraph/gpu/rocblas.hpp> #include <migraphx/gpu/rocblas.hpp>
#include <migraph/gpu/context.hpp> #include <migraphx/gpu/context.hpp>
#include <utility> #include <utility>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -34,6 +34,6 @@ struct miopen_softmax ...@@ -34,6 +34,6 @@ struct miopen_softmax
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_MIOPEN_TARGET_HPP #ifndef MIGRAPH_GUARD_MIGRAPHLIB_MIOPEN_TARGET_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_MIOPEN_TARGET_HPP #define MIGRAPH_GUARD_MIGRAPHLIB_MIOPEN_TARGET_HPP
#include <migraph/program.hpp> #include <migraphx/program.hpp>
#include <migraph/config.hpp> #include <migraphx/config.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
struct target struct target
{ {
std::string name() const; std::string name() const;
std::vector<pass> get_passes(migraph::context& gctx) const; std::vector<pass> get_passes(migraphx::context& gctx) const;
migraph::context get_context() const; migraphx::context get_context() const;
}; };
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
#ifndef MIGRAPH_GUARD_RTGLIB_MIOPEN_WRITE_LITERALS_HPP #ifndef MIGRAPH_GUARD_RTGLIB_MIOPEN_WRITE_LITERALS_HPP
#define MIGRAPH_GUARD_RTGLIB_MIOPEN_WRITE_LITERALS_HPP #define MIGRAPH_GUARD_RTGLIB_MIOPEN_WRITE_LITERALS_HPP
#include <migraph/program.hpp> #include <migraphx/program.hpp>
#include <migraph/gpu/context.hpp> #include <migraphx/gpu/context.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -19,6 +19,6 @@ struct write_literals ...@@ -19,6 +19,6 @@ struct write_literals
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#endif #endif
#include <migraph/gpu/leaky_relu.hpp> #include <migraphx/gpu/leaky_relu.hpp>
#include <migraph/operators.hpp> #include <migraphx/operators.hpp>
#include <migraph/manage_ptr.hpp> #include <migraphx/manage_ptr.hpp>
#include <migraph/gpu/miopen.hpp> #include <migraphx/gpu/miopen.hpp>
#include <utility> #include <utility>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -35,4 +35,4 @@ argument miopen_leaky_relu::compute(context& ctx, ...@@ -35,4 +35,4 @@ argument miopen_leaky_relu::compute(context& ctx,
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#include <rocblas.h> #include <rocblas.h>
#include <migraph/gpu/lowering.hpp> #include <migraphx/gpu/lowering.hpp>
#include <migraph/manage_ptr.hpp> #include <migraphx/manage_ptr.hpp>
#include <migraph/instruction.hpp> #include <migraphx/instruction.hpp>
#include <migraph/operators.hpp> #include <migraphx/operators.hpp>
#include <migraph/generate.hpp> #include <migraphx/generate.hpp>
#include <migraph/shape_for_each.hpp> #include <migraphx/shape_for_each.hpp>
#include <migraph/gpu/miopen.hpp> #include <migraphx/gpu/miopen.hpp>
#include <migraph/gpu/hip.hpp> #include <migraphx/gpu/hip.hpp>
#include <migraph/dfor.hpp> #include <migraphx/dfor.hpp>
#include <migraph/gpu/device/contiguous.hpp> #include <migraphx/gpu/device/contiguous.hpp>
#include <migraph/gpu/device/add.hpp> #include <migraphx/gpu/device/add.hpp>
#include <migraph/iterator_for.hpp> #include <migraphx/iterator_for.hpp>
#include <migraph/gpu/rocblas.hpp> #include <migraphx/gpu/rocblas.hpp>
#include <migraph/gpu/context.hpp> #include <migraphx/gpu/context.hpp>
#include <migraph/gpu/convolution.hpp> #include <migraphx/gpu/convolution.hpp>
#include <migraph/gpu/contiguous.hpp> #include <migraphx/gpu/contiguous.hpp>
#include <migraph/gpu/relu.hpp> #include <migraphx/gpu/relu.hpp>
#include <migraph/gpu/leaky_relu.hpp> #include <migraphx/gpu/leaky_relu.hpp>
#include <migraph/gpu/softmax.hpp> #include <migraphx/gpu/softmax.hpp>
#include <migraph/gpu/add.hpp> #include <migraphx/gpu/add.hpp>
#include <migraph/gpu/mul.hpp> #include <migraphx/gpu/mul.hpp>
#include <migraph/gpu/batchnorm.hpp> #include <migraphx/gpu/batchnorm.hpp>
#include <migraph/gpu/pooling.hpp> #include <migraphx/gpu/pooling.hpp>
#include <migraph/gpu/gemm.hpp> #include <migraphx/gpu/gemm.hpp>
#include <migraph/gpu/concat.hpp> #include <migraphx/gpu/concat.hpp>
#include <utility> #include <utility>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -222,4 +222,4 @@ struct miopen_apply ...@@ -222,4 +222,4 @@ struct miopen_apply
void lowering::apply(program& p) const { miopen_apply{&p, ctx}.apply(); } void lowering::apply(program& p) const { miopen_apply{&p, ctx}.apply(); }
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#include <migraph/gpu/mul.hpp> #include <migraphx/gpu/mul.hpp>
#include <migraph/operators.hpp> #include <migraphx/operators.hpp>
#include <migraph/manage_ptr.hpp> #include <migraphx/manage_ptr.hpp>
#include <migraph/gpu/miopen.hpp> #include <migraphx/gpu/miopen.hpp>
#include <utility> #include <utility>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -23,4 +23,4 @@ argument hip_mul::compute(context& ctx, const shape&, const std::vector<argument ...@@ -23,4 +23,4 @@ argument hip_mul::compute(context& ctx, const shape&, const std::vector<argument
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#include <migraph/gpu/pooling.hpp> #include <migraphx/gpu/pooling.hpp>
#include <migraph/operators.hpp> #include <migraphx/operators.hpp>
#include <migraph/manage_ptr.hpp> #include <migraphx/manage_ptr.hpp>
#include <migraph/gpu/miopen.hpp> #include <migraphx/gpu/miopen.hpp>
#include <utility> #include <utility>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -39,4 +39,4 @@ argument miopen_pooling::compute(context& ctx, ...@@ -39,4 +39,4 @@ argument miopen_pooling::compute(context& ctx,
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#include <migraph/gpu/relu.hpp> #include <migraphx/gpu/relu.hpp>
#include <migraph/operators.hpp> #include <migraphx/operators.hpp>
#include <migraph/manage_ptr.hpp> #include <migraphx/manage_ptr.hpp>
#include <migraph/gpu/miopen.hpp> #include <migraphx/gpu/miopen.hpp>
#include <utility> #include <utility>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -35,4 +35,4 @@ argument miopen_relu::compute(context& ctx, ...@@ -35,4 +35,4 @@ argument miopen_relu::compute(context& ctx,
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#include <migraph/gpu/rocblas.hpp> #include <migraphx/gpu/rocblas.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -20,4 +20,4 @@ rocblas_handle_ptr create_rocblas_handle_ptr(hipStream_t s) ...@@ -20,4 +20,4 @@ rocblas_handle_ptr create_rocblas_handle_ptr(hipStream_t s)
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#include <migraph/gpu/softmax.hpp> #include <migraphx/gpu/softmax.hpp>
#include <migraph/operators.hpp> #include <migraphx/operators.hpp>
#include <migraph/manage_ptr.hpp> #include <migraphx/manage_ptr.hpp>
#include <migraph/gpu/miopen.hpp> #include <migraphx/gpu/miopen.hpp>
#include <utility> #include <utility>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -34,4 +34,4 @@ argument miopen_softmax::compute(context& ctx, ...@@ -34,4 +34,4 @@ argument miopen_softmax::compute(context& ctx,
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#include <migraph/gpu/target.hpp> #include <migraphx/gpu/target.hpp>
#include <migraph/gpu/lowering.hpp> #include <migraphx/gpu/lowering.hpp>
#include <migraph/memory_coloring.hpp> #include <migraphx/memory_coloring.hpp>
#include <migraph/gpu/write_literals.hpp> #include <migraphx/gpu/write_literals.hpp>
#include <migraph/gpu/context.hpp> #include <migraphx/gpu/context.hpp>
#include <migraph/gpu/eliminate_workspace.hpp> #include <migraphx/gpu/eliminate_workspace.hpp>
#include <migraph/eliminate_allocation.hpp> #include <migraphx/eliminate_allocation.hpp>
#include <migraph/gpu/fuse_ops.hpp> #include <migraphx/gpu/fuse_ops.hpp>
#include <migraph/check_context.hpp> #include <migraphx/check_context.hpp>
#include <migraph/auto_contiguous.hpp> #include <migraphx/auto_contiguous.hpp>
#include <migraph/dead_code_elimination.hpp> #include <migraphx/dead_code_elimination.hpp>
#include <migraph/simplify_reshapes.hpp> #include <migraphx/simplify_reshapes.hpp>
#include <migraph/simplify_algebra.hpp> #include <migraphx/simplify_algebra.hpp>
#include <migraph/constant_propagate.hpp> #include <migraphx/constant_propagate.hpp>
#include <migraph/eliminate_contiguous.hpp> #include <migraphx/eliminate_contiguous.hpp>
#include <migraph/common_subexpression_elimination.hpp> #include <migraphx/common_subexpression_elimination.hpp>
#include <migraph/fwd_conv_batchnorm_rewrite.hpp> #include <migraphx/fwd_conv_batchnorm_rewrite.hpp>
#include <migraph/eliminate_concat.hpp> #include <migraphx/eliminate_concat.hpp>
#include <migraph/gpu/concat_gpu_opt.hpp> #include <migraphx/gpu/concat_gpu_opt.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
std::vector<pass> target::get_passes(migraph::context& gctx) const std::vector<pass> target::get_passes(migraphx::context& gctx) const
{ {
auto& ctx = any_cast<context>(gctx); auto& ctx = any_cast<context>(gctx);
// clang-format off // clang-format off
...@@ -59,7 +59,7 @@ std::vector<pass> target::get_passes(migraph::context& gctx) const ...@@ -59,7 +59,7 @@ std::vector<pass> target::get_passes(migraph::context& gctx) const
std::string target::name() const { return "miopen"; } std::string target::name() const { return "miopen"; }
migraph::context target::get_context() const { return context{}; } migraphx::context target::get_context() const { return context{}; }
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
#include <migraph/gpu/write_literals.hpp> #include <migraphx/gpu/write_literals.hpp>
#include <migraph/iterator_for.hpp> #include <migraphx/iterator_for.hpp>
#include <migraph/gpu/hip.hpp> #include <migraphx/gpu/hip.hpp>
#include <migraph/instruction.hpp> #include <migraphx/instruction.hpp>
#include <migraph/env.hpp> #include <migraphx/env.hpp>
namespace migraph { namespace migraphx {
inline namespace MIGRAPH_INLINE_NS { inline namespace MIGRAPH_INLINE_NS {
namespace gpu { namespace gpu {
...@@ -54,4 +54,4 @@ void write_literals::apply(program& p) const ...@@ -54,4 +54,4 @@ void write_literals::apply(program& p) const
} // namespace gpu } // namespace gpu
} // namespace MIGRAPH_INLINE_NS } // namespace MIGRAPH_INLINE_NS
} // namespace migraph } // namespace migraphx
...@@ -83,7 +83,7 @@ function(add_test_executable TEST_NAME) ...@@ -83,7 +83,7 @@ function(add_test_executable TEST_NAME)
add_dependencies(tests ${TEST_NAME}) add_dependencies(tests ${TEST_NAME})
add_dependencies(check ${TEST_NAME}) add_dependencies(check ${TEST_NAME})
set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED") set_tests_properties(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED")
target_link_libraries(${TEST_NAME} migraph migraph_cpu migraph_onnx) target_link_libraries(${TEST_NAME} migraphx migraphx_cpu migraphx_onnx)
target_include_directories(${TEST_NAME} PUBLIC include) target_include_directories(${TEST_NAME} PUBLIC include)
endfunction(add_test_executable) endfunction(add_test_executable)
...@@ -107,14 +107,14 @@ if(MIGRAPH_ENABLE_GPU) ...@@ -107,14 +107,14 @@ if(MIGRAPH_ENABLE_GPU)
COST 10 COST 10
RESOURCE_LOCK gpu RESOURCE_LOCK gpu
) )
target_link_libraries(test_gpu_${BASE_NAME} migraph_gpu) target_link_libraries(test_gpu_${BASE_NAME} migraphx_gpu)
endforeach() endforeach()
endif() endif()
# Onnx test # Onnx test
add_executable(test_onnx onnx/onnx_test.cpp) add_executable(test_onnx onnx/onnx_test.cpp)
rocm_clang_tidy_check(test_onnx) rocm_clang_tidy_check(test_onnx)
target_link_libraries(test_onnx migraph_onnx) target_link_libraries(test_onnx migraphx_onnx)
target_include_directories(test_onnx PUBLIC include) target_include_directories(test_onnx PUBLIC include)
add_test(NAME test_onnx COMMAND $<TARGET_FILE:test_onnx> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/onnx) add_test(NAME test_onnx COMMAND $<TARGET_FILE:test_onnx> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/onnx)
add_dependencies(tests test_onnx) add_dependencies(tests test_onnx)
...@@ -143,13 +143,13 @@ function(test_headers PREFIX) ...@@ -143,13 +143,13 @@ function(test_headers PREFIX)
get_filename_component(BASE_NAME ${HEADER} NAME_WE) get_filename_component(BASE_NAME ${HEADER} NAME_WE)
test_header(header_${TEST_NAME} ${PREFIX}/${BASE_NAME}.hpp) test_header(header_${TEST_NAME} ${PREFIX}/${BASE_NAME}.hpp)
if(MIGRAPH_ENABLE_GPU) if(MIGRAPH_ENABLE_GPU)
target_link_libraries(header_${TEST_NAME} migraph_gpu) target_link_libraries(header_${TEST_NAME} migraphx_gpu)
endif() endif()
endforeach() endforeach()
endfunction() endfunction()
test_headers(migraph ${CMAKE_SOURCE_DIR}/src/include/migraph/*.hpp) test_headers(migraphx ${CMAKE_SOURCE_DIR}/src/include/migraphx/*.hpp)
test_headers(migraph/cpu ${CMAKE_SOURCE_DIR}/src/targets/cpu/include/migraph/cpu/*.hpp) test_headers(migraphx/cpu ${CMAKE_SOURCE_DIR}/src/targets/cpu/include/migraphx/cpu/*.hpp)
if(MIGRAPH_ENABLE_GPU) if(MIGRAPH_ENABLE_GPU)
test_headers(migraph/gpu ${CMAKE_SOURCE_DIR}/src/targets/gpu/include/migraph/gpu/*.hpp) test_headers(migraphx/gpu ${CMAKE_SOURCE_DIR}/src/targets/gpu/include/migraphx/gpu/*.hpp)
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