Commit 96358e41 authored by Paul's avatar Paul
Browse files

Rename to migraphx

parent 80203608
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_CPU_TARGET_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_CPU_TARGET_HPP
#include <migraph/program.hpp>
#include <migraph/cpu/context.hpp>
#include <migraph/config.hpp>
#include <migraphx/program.hpp>
#include <migraphx/cpu/context.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace cpu {
struct target
{
std::string name() const;
std::vector<pass> get_passes(migraph::context& ctx) const;
migraph::context get_context() const { return context{}; }
std::vector<pass> get_passes(migraphx::context& ctx) const;
migraphx::context get_context() const { return context{}; }
};
} // namespace cpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
#include <migraph/cpu/lowering.hpp>
#include <migraph/instruction.hpp>
#include <migraph/dfor.hpp>
#include <migraph/operators.hpp>
#include <migraph/shape_for_each.hpp>
#include <migraph/iterator_for.hpp>
#include <migraph/cpu/gemm.hpp>
#include <migraphx/cpu/lowering.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/dfor.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/cpu/gemm.hpp>
#include <unordered_map>
#include <utility>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace cpu {
......@@ -659,4 +659,4 @@ void lowering::apply(program& p) const { cpu_apply{&p}.apply(); }
} // namespace cpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include <migraph/cpu/target.hpp>
#include <migraph/cpu/lowering.hpp>
#include <migraph/auto_contiguous.hpp>
#include <migraphx/cpu/target.hpp>
#include <migraphx/cpu/lowering.hpp>
#include <migraphx/auto_contiguous.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace cpu {
std::string target::name() const { return "cpu"; }
std::vector<pass> target::get_passes(migraph::context&) const
std::vector<pass> target::get_passes(migraphx::context&) const
{
return {auto_contiguous{}, lowering{}};
}
} // namespace cpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
......@@ -10,20 +10,20 @@ if(NOT TARGET MIOpen)
message(SEND_ERROR "Cant find miopen")
endif()
add_library(migraph_device
add_library(migraphx_device
device/add.cpp
device/add_relu.cpp
device/contiguous.cpp
device/mul.cpp
device/concat.cpp
)
set_target_properties(migraph_device PROPERTIES EXPORT_NAME device)
rocm_clang_tidy_check(migraph_device)
target_link_libraries(migraph_device migraph hip::device)
target_include_directories(migraph_device PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
target_include_directories(migraph_device PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/device/include>)
set_target_properties(migraphx_device PROPERTIES EXPORT_NAME device)
rocm_clang_tidy_check(migraphx_device)
target_link_libraries(migraphx_device migraphx hip::device)
target_include_directories(migraphx_device PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
target_include_directories(migraphx_device PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/device/include>)
add_library(migraph_gpu
add_library(migraphx_gpu
eliminate_workspace.cpp
fuse_ops.cpp
hip.cpp
......@@ -43,13 +43,13 @@ add_library(migraph_gpu
write_literals.cpp
rocblas.cpp
)
set_target_properties(migraph_gpu PROPERTIES EXPORT_NAME gpu)
rocm_clang_tidy_check(migraph_gpu)
target_link_libraries(migraph_gpu PUBLIC migraph MIOpen roc::rocblas)
target_link_libraries(migraph_gpu PRIVATE migraph_device)
set_target_properties(migraphx_gpu PROPERTIES EXPORT_NAME gpu)
rocm_clang_tidy_check(migraphx_gpu)
target_link_libraries(migraphx_gpu PUBLIC migraphx MIOpen roc::rocblas)
target_link_libraries(migraphx_gpu PRIVATE migraphx_device)
rocm_install_targets(
TARGETS migraph_gpu migraph_device
TARGETS migraphx_gpu migraphx_device
INCLUDE
${CMAKE_CURRENT_SOURCE_DIR}/include
)
......
#include <migraph/gpu/add.hpp>
#include <migraph/operators.hpp>
#include <migraph/manage_ptr.hpp>
#include <migraph/config.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraphx/gpu/add.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/config.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <utility>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
......@@ -52,4 +52,4 @@ argument miopen_add::compute(context& ctx,
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include <migraph/gpu/batchnorm.hpp>
#include <migraph/operators.hpp>
#include <migraph/manage_ptr.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraphx/gpu/batchnorm.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <utility>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
......@@ -44,4 +44,4 @@ argument miopen_batch_norm_inference::compute(context& ctx,
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include <migraph/gpu/concat.hpp>
#include <migraph/operators.hpp>
#include <migraph/manage_ptr.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraph/gpu/device/concat.hpp>
#include <migraphx/gpu/concat.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <migraphx/gpu/device/concat.hpp>
#include <utility>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
......@@ -25,4 +25,4 @@ argument hip_concat::compute(context& ctx,
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include <migraph/gpu/contiguous.hpp>
#include <migraph/operators.hpp>
#include <migraph/manage_ptr.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraphx/gpu/contiguous.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <utility>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
......@@ -26,4 +26,4 @@ argument miopen_contiguous::compute(context& ctx,
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include <migraph/gpu/convolution.hpp>
#include <migraph/operators.hpp>
#include <migraph/manage_ptr.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraphx/gpu/convolution.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/manage_ptr.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <utility>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
......@@ -83,4 +83,4 @@ shape miopen_convolution::compile(context& ctx,
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include <migraph/gpu/device/add.hpp>
#include <migraph/gpu/device/nary.hpp>
#include <migraphx/gpu/device/add.hpp>
#include <migraphx/gpu/device/nary.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
namespace device {
......@@ -23,4 +23,4 @@ void add(hipStream_t stream,
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include <migraph/gpu/device/add_relu.hpp>
#include <migraph/gpu/device/nary.hpp>
#include <migraphx/gpu/device/add_relu.hpp>
#include <migraphx/gpu/device/nary.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
namespace device {
......@@ -28,4 +28,4 @@ void add_relu(hipStream_t stream,
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include <migraph/shape.hpp>
#include <migraph/argument.hpp>
#include <migraph/gpu/device/concat.hpp>
#include <migraph/gpu/device/tensor.hpp>
#include <migraph/gpu/device/launch.hpp>
#include <migraphx/shape.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/gpu/device/concat.hpp>
#include <migraphx/gpu/device/tensor.hpp>
#include <migraphx/gpu/device/launch.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
namespace device {
argument concat(hipStream_t stream,
const migraph::shape& output_shape,
std::vector<migraph::argument> args,
const migraphx::shape& output_shape,
std::vector<migraphx::argument> args,
std::vector<std::size_t> offsets)
{
for(std::size_t l = 0; l < args.size() - 1; l++)
......@@ -35,4 +35,4 @@ argument concat(hipStream_t stream,
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include <migraph/gpu/device/contiguous.hpp>
#include <migraph/gpu/device/nary.hpp>
#include <migraphx/gpu/device/contiguous.hpp>
#include <migraphx/gpu/device/nary.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
namespace device {
......@@ -15,4 +15,4 @@ void contiguous(hipStream_t stream, argument result, argument arg)
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
......@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_RTGLIB_DEVICE_LAUNCH_HPP
#include <hip/hip_runtime.h>
#include <migraph/config.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
namespace device {
......@@ -61,6 +61,6 @@ inline auto gs_launch(hipStream_t stream, std::size_t n, std::size_t local = 102
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
#ifndef MIGRAPH_GUARD_RTGLIB_DEVICE_NARY_HPP
#define MIGRAPH_GUARD_RTGLIB_DEVICE_NARY_HPP
#include <migraph/gpu/device/tensor.hpp>
#include <migraph/gpu/device/launch.hpp>
#include <migraph/gpu/device/types.hpp>
#include <migraph/functional.hpp>
#include <migraph/ranges.hpp>
#include <migraph/config.hpp>
namespace migraph {
#include <migraphx/gpu/device/tensor.hpp>
#include <migraphx/gpu/device/launch.hpp>
#include <migraphx/gpu/device/types.hpp>
#include <migraphx/functional.hpp>
#include <migraphx/ranges.hpp>
#include <migraphx/config.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
namespace device {
......@@ -397,6 +397,6 @@ inline auto nary(hipStream_t stream,
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
......@@ -2,10 +2,10 @@
#define MIGRAPH_GUARD_RTGLIB_DEAVICE_TENSOR_HPP
#include <hip/hip_runtime.h>
#include <migraph/functional.hpp>
#include <migraph/config.hpp>
#include <migraphx/functional.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
namespace device {
......@@ -88,6 +88,6 @@ struct hip_tensor_descriptor
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
......@@ -8,10 +8,10 @@
#ifndef MIGRAPH_GUARD_RTGLIB_GPU_DEVICE_TYPES_HPP
#define MIGRAPH_GUARD_RTGLIB_GPU_DEVICE_TYPES_HPP
#include <migraph/half.hpp>
#include <migraph/config.hpp>
#include <migraphx/half.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
namespace device {
......@@ -78,6 +78,6 @@ device_type<T>* device_cast(T* x)
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
#include <migraph/gpu/device/mul.hpp>
#include <migraph/gpu/device/nary.hpp>
#include <migraphx/gpu/device/mul.hpp>
#include <migraphx/gpu/device/nary.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
namespace device {
......@@ -23,4 +23,4 @@ void mul(hipStream_t stream,
} // namespace device
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include <migraph/gpu/eliminate_workspace.hpp>
#include <migraph/gpu/hip.hpp>
#include <migraph/program.hpp>
#include <migraph/instruction.hpp>
#include <migraph/operators.hpp>
#include <migraph/iterator_for.hpp>
#include <migraph/ranges.hpp>
#include <migraph/stringutils.hpp>
#include <migraph/pass_config.hpp>
#include <migraphx/gpu/eliminate_workspace.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/program.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/ranges.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/pass_config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
......@@ -42,4 +42,4 @@ void eliminate_workspace::apply(program& p) const
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include <migraph/gpu/fuse_ops.hpp>
#include <migraph/matcher.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraph/gpu/convolution.hpp>
#include <migraph/gpu/device/add_relu.hpp>
#include <migraph/instruction.hpp>
namespace migraph {
#include <migraphx/gpu/fuse_ops.hpp>
#include <migraphx/matcher.hpp>
#include <migraphx/gpu/miopen.hpp>
#include <migraphx/gpu/convolution.hpp>
#include <migraphx/gpu/device/add_relu.hpp>
#include <migraphx/instruction.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace gpu {
......@@ -390,4 +390,4 @@ void fuse_ops::apply(program& p) const
} // namespace gpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // 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