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_VERIFY_ARGS_HPP
#define MIGRAPH_GUARD_RTGLIB_VERIFY_ARGS_HPP
#include <migraph/verify.hpp>
#include <migraph/argument.hpp>
#include <migraph/config.hpp>
#include <migraphx/verify.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
inline bool verify_args(const std::string& name,
......@@ -85,6 +85,6 @@ inline bool verify_args(const std::string& name,
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
#include <migraph/instruction.hpp>
#include <migraph/builtin.hpp>
#include <migraph/erase.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/builtin.hpp>
#include <migraphx/erase.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
instruction::instruction(operation o, shape r, std::vector<instruction_ref> args)
......@@ -70,7 +70,7 @@ bool instruction::valid() const
{
computed = compute_shape(op, arguments);
}
catch(migraph::exception&)
catch(migraphx::exception&)
{
return false;
}
......@@ -184,4 +184,4 @@ shape compute_shape(const operation& op, const std::vector<instruction_ref>& arg
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
......@@ -7,35 +7,35 @@ target_compile_options(onnx-proto PRIVATE -w)
target_link_libraries(onnx-proto PRIVATE ${PROTOBUF_LIBRARY})
set_target_properties(onnx-proto PROPERTIES POSITION_INDEPENDENT_CODE On)
add_library(migraph_onnx onnx.cpp)
set_target_properties(migraph_onnx PROPERTIES EXPORT_NAME onnx)
rocm_clang_tidy_check(migraph_onnx)
target_link_libraries(migraph_onnx PRIVATE onnx-proto)
target_link_libraries(migraph_onnx PUBLIC migraph)
add_library(migraphx_onnx onnx.cpp)
set_target_properties(migraphx_onnx PROPERTIES EXPORT_NAME onnx)
rocm_clang_tidy_check(migraphx_onnx)
target_link_libraries(migraphx_onnx PRIVATE onnx-proto)
target_link_libraries(migraphx_onnx PUBLIC migraphx)
rocm_install_targets(
TARGETS migraph_onnx
TARGETS migraphx_onnx
)
add_executable(read_onnx read_onnx.cpp)
rocm_clang_tidy_check(read_onnx)
target_link_libraries(read_onnx migraph_onnx)
target_link_libraries(read_onnx migraphx_onnx)
if(MIGRAPH_ENABLE_GPU)
add_executable(mnist mnist.cpp)
rocm_clang_tidy_check(mnist)
target_link_libraries(mnist migraph_cpu migraph_gpu migraph_onnx)
target_link_libraries(mnist migraphx_cpu migraphx_gpu migraphx_onnx)
add_executable(cifar10 cifar10.cpp)
rocm_clang_tidy_check(cifar10)
target_link_libraries(cifar10 migraph_cpu migraph_gpu migraph_onnx)
target_link_libraries(cifar10 migraphx_cpu migraphx_gpu migraphx_onnx)
add_executable(verify_onnx verify_onnx.cpp)
rocm_clang_tidy_check(verify_onnx)
target_link_libraries(verify_onnx migraph_onnx migraph_cpu migraph_gpu)
target_link_libraries(verify_onnx migraphx_onnx migraphx_cpu migraphx_gpu)
add_executable(perf_onnx perf_onnx.cpp)
rocm_clang_tidy_check(perf_onnx)
target_link_libraries(perf_onnx migraph_onnx migraph_cpu migraph_gpu)
target_link_libraries(perf_onnx migraphx_onnx migraphx_cpu migraphx_gpu)
endif()
......@@ -4,12 +4,12 @@
#include <numeric>
#include <stdexcept>
#include <migraph/onnx.hpp>
#include <migraphx/onnx.hpp>
#include <migraph/cpu/target.hpp>
#include <migraph/gpu/target.hpp>
#include <migraph/gpu/hip.hpp>
#include <migraph/generate.hpp>
#include <migraphx/cpu/target.hpp>
#include <migraphx/gpu/target.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/generate.hpp>
#include "softmax.hpp"
......@@ -53,19 +53,19 @@ int main(int argc, char const* argv[])
std::string gpu_cpu = argv[1];
std::string file = argv[2];
std::string datafile = argv[3];
auto prog = migraph::parse_onnx(file);
auto prog = migraphx::parse_onnx(file);
std::cout << prog << std::endl;
auto imageset = read_cifar10_images(datafile);
if(gpu_cpu == "gpu")
{
// GPU target
prog.compile(migraph::gpu::target{});
migraph::program::parameter_map m;
auto s = migraph::shape{migraph::shape::float_type, {1, 3, 32, 32}};
prog.compile(migraphx::gpu::target{});
migraphx::program::parameter_map m;
auto s = migraphx::shape{migraphx::shape::float_type, {1, 3, 32, 32}};
for(auto&& x : prog.get_parameter_shapes())
{
m[x.first] = migraph::gpu::to_gpu(migraph::generate_argument(x.second));
m[x.first] = migraphx::gpu::to_gpu(migraphx::generate_argument(x.second));
}
auto labels = imageset.first;
auto input = imageset.second;
......@@ -73,8 +73,8 @@ int main(int argc, char const* argv[])
for(int i = 0; i < 10; i++)
{
std::cout << "label: " << static_cast<uint32_t>(labels[i]) << " ----> ";
m["0"] = migraph::gpu::to_gpu(migraph::argument{s, &ptr[3072 * i]});
auto result = migraph::gpu::from_gpu(prog.eval(m));
m["0"] = migraphx::gpu::to_gpu(migraphx::argument{s, &ptr[3072 * i]});
auto result = migraphx::gpu::from_gpu(prog.eval(m));
std::vector<float> logits;
result.visit([&](auto output) { logits.assign(output.begin(), output.end()); });
std::vector<float> probs = softmax<float>(logits);
......@@ -86,15 +86,15 @@ int main(int argc, char const* argv[])
else
{
// CPU target
prog.compile(migraph::cpu::target{});
auto s = migraph::shape{migraph::shape::float_type, {1, 3, 32, 32}};
prog.compile(migraphx::cpu::target{});
auto s = migraphx::shape{migraphx::shape::float_type, {1, 3, 32, 32}};
auto labels = imageset.first;
auto input = imageset.second;
auto ptr = input.data();
for(int i = 0; i < 10; i++)
{
std::cout << "label: " << static_cast<uint32_t>(labels[i]) << " ----> ";
auto input3 = migraph::argument{s, &ptr[3072 * i]};
auto input3 = migraphx::argument{s, &ptr[3072 * i]};
auto result = prog.eval({{"0", input3}});
std::vector<float> logits;
result.visit([&](auto output) { logits.assign(output.begin(), output.end()); });
......
......@@ -4,11 +4,11 @@
#include <numeric>
#include <stdexcept>
#include <migraph/onnx.hpp>
#include <migraphx/onnx.hpp>
#include <migraph/gpu/target.hpp>
#include <migraph/gpu/hip.hpp>
#include <migraph/generate.hpp>
#include <migraphx/gpu/target.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/generate.hpp>
#include "softmax.hpp"
......@@ -113,20 +113,20 @@ int main(int argc, char const* argv[])
std::vector<int32_t> labels = read_mnist_labels(labelfile, nlabels);
std::string file = argv[1];
auto prog = migraph::parse_onnx(file);
auto prog = migraphx::parse_onnx(file);
std::cout << prog << std::endl << std::endl;
prog.compile(migraph::gpu::target{});
auto s = migraph::shape{migraph::shape::float_type, {1, 1, 28, 28}};
prog.compile(migraphx::gpu::target{});
auto s = migraphx::shape{migraphx::shape::float_type, {1, 1, 28, 28}};
std::cout << s << std::endl;
auto ptr = input.data();
migraph::program::parameter_map m;
migraphx::program::parameter_map m;
m["output"] =
migraph::gpu::to_gpu(migraph::generate_argument(prog.get_parameter_shape("output")));
migraphx::gpu::to_gpu(migraphx::generate_argument(prog.get_parameter_shape("output")));
for(int i = 0; i < 20; i++)
{
std::cout << "label: " << labels[i] << " ----> ";
m["0"] = migraph::gpu::to_gpu(migraph::argument{s, &ptr[784 * i]});
auto result = migraph::gpu::from_gpu(prog.eval(m));
m["0"] = migraphx::gpu::to_gpu(migraphx::argument{s, &ptr[784 * i]});
auto result = migraphx::gpu::from_gpu(prog.eval(m));
std::vector<float> logits;
result.visit([&](auto output) { logits.assign(output.begin(), output.end()); });
std::vector<float> probs = softmax(logits);
......
......@@ -9,14 +9,14 @@
#include <utility>
#include <vector>
#include <migraph/fallthrough.hpp>
#include <migraph/program.hpp>
#include <migraph/operators.hpp>
#include <migraph/ranges.hpp>
#include <migraph/instruction.hpp>
#include <migraph/config.hpp>
namespace migraph {
#include <migraphx/fallthrough.hpp>
#include <migraphx/program.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/ranges.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/config.hpp>
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
struct unknown
{
......@@ -407,12 +407,12 @@ struct onnx_parser
auto scale_val = prog.add_literal(scale);
auto bias_vals = prog.add_literal(
migraph::literal{migraph::shape{migraph::shape::float_type, {bias.size()}}, bias});
migraphx::literal{migraphx::shape{migraphx::shape::float_type, {bias.size()}}, bias});
auto scale_tensor = prog.add_instruction(migraph::op::scalar{input_shape}, scale_val);
auto img_scaled = prog.add_instruction(migraph::op::mul{}, args.front(), scale_tensor);
auto bias_bcast = prog.add_instruction(migraph::op::broadcast{1, input_shape}, bias_vals);
return prog.add_instruction(migraph::op::add{}, img_scaled, bias_bcast);
auto scale_tensor = prog.add_instruction(migraphx::op::scalar{input_shape}, scale_val);
auto img_scaled = prog.add_instruction(migraphx::op::mul{}, args.front(), scale_tensor);
auto bias_bcast = prog.add_instruction(migraphx::op::broadcast{1, input_shape}, bias_vals);
return prog.add_instruction(migraphx::op::add{}, img_scaled, bias_bcast);
}
instruction_ref
......@@ -424,7 +424,7 @@ struct onnx_parser
auto&& perm_vals = attributes["perm"].ints();
perm = std::vector<int64_t>(perm_vals.begin(), perm_vals.end());
}
return prog.add_instruction(migraph::op::transpose{perm}, args.front());
return prog.add_instruction(migraphx::op::transpose{perm}, args.front());
}
void parse_from(std::istream& is)
......@@ -520,7 +520,7 @@ struct onnx_parser
{
if(node.name().empty())
{
std::string generated = "migraph_unnamed_node";
std::string generated = "migraphx_unnamed_node";
return std::accumulate(node.output().begin(),
node.output().end(),
generated,
......@@ -695,4 +695,4 @@ program parse_onnx(const std::string& name)
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include <migraph/onnx.hpp>
#include <migraphx/onnx.hpp>
#include <migraph/gpu/target.hpp>
#include <migraph/gpu/hip.hpp>
#include <migraph/generate.hpp>
#include <migraph/verify.hpp>
#include <migraphx/gpu/target.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/verify.hpp>
migraph::program::parameter_map create_param_map(const migraph::program& p, bool gpu = true)
migraphx::program::parameter_map create_param_map(const migraphx::program& p, bool gpu = true)
{
migraph::program::parameter_map m;
migraphx::program::parameter_map m;
for(auto&& x : p.get_parameter_shapes())
{
if(gpu)
m[x.first] = migraph::gpu::to_gpu(migraph::generate_argument(x.second));
m[x.first] = migraphx::gpu::to_gpu(migraphx::generate_argument(x.second));
else
m[x.first] = migraph::generate_argument(x.second);
m[x.first] = migraphx::generate_argument(x.second);
}
return m;
}
......@@ -25,9 +25,9 @@ int main(int argc, char const* argv[])
{
std::string file = argv[1];
std::size_t n = argc > 2 ? std::stoul(argv[2]) : 50;
auto p = migraph::parse_onnx(file);
auto p = migraphx::parse_onnx(file);
std::cout << "Compiling ... " << std::endl;
p.compile(migraph::gpu::target{});
p.compile(migraphx::gpu::target{});
std::cout << "Allocating params ... " << std::endl;
auto m = create_param_map(p);
std::cout << "Running performance report ... " << std::endl;
......
#include <migraph/onnx.hpp>
#include <migraphx/onnx.hpp>
int main(int argc, char const* argv[])
{
if(argc > 1)
{
std::string file = argv[1];
auto prog = migraph::parse_onnx(file);
auto prog = migraphx::parse_onnx(file);
std::cout << prog << std::endl;
}
}
#include <migraph/onnx.hpp>
#include <migraphx/onnx.hpp>
#include <migraph/cpu/target.hpp>
#include <migraph/gpu/target.hpp>
#include <migraph/gpu/hip.hpp>
#include <migraph/generate.hpp>
#include <migraph/verify_args.hpp>
#include <migraph/instruction.hpp>
#include <migraphx/cpu/target.hpp>
#include <migraphx/gpu/target.hpp>
#include <migraphx/gpu/hip.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/verify_args.hpp>
#include <migraphx/instruction.hpp>
template <class T>
auto get_hash(const T& x)
......@@ -15,14 +15,14 @@ auto get_hash(const T& x)
}
template <class F>
migraph::argument run_cpu(F f)
migraphx::argument run_cpu(F f)
{
auto p = f();
p.compile(migraph::cpu::target{});
migraph::program::parameter_map m;
p.compile(migraphx::cpu::target{});
migraphx::program::parameter_map m;
for(auto&& x : p.get_parameter_shapes())
{
m[x.first] = migraph::generate_argument(x.second, get_hash(x.first));
m[x.first] = migraphx::generate_argument(x.second, get_hash(x.first));
}
auto out = p.eval(m);
std::cout << p << std::endl;
......@@ -30,19 +30,20 @@ migraph::argument run_cpu(F f)
}
template <class F>
migraph::argument run_gpu(F f)
migraphx::argument run_gpu(F f)
{
auto p = f();
p.compile(migraph::gpu::target{});
p.compile(migraphx::gpu::target{});
migraph::program::parameter_map m;
migraphx::program::parameter_map m;
for(auto&& x : p.get_parameter_shapes())
{
m[x.first] = migraph::gpu::to_gpu(migraph::generate_argument(x.second, get_hash(x.first)));
m[x.first] =
migraphx::gpu::to_gpu(migraphx::generate_argument(x.second, get_hash(x.first)));
}
auto out = migraph::gpu::from_gpu(p.eval(m));
auto out = migraphx::gpu::from_gpu(p.eval(m));
std::cout << p << std::endl;
return migraph::gpu::from_gpu(out);
return migraphx::gpu::from_gpu(out);
}
template <class F>
......@@ -50,12 +51,12 @@ void verify_program(const std::string& name, F f, double tolerance = 100)
{
auto x = run_cpu(f);
auto y = run_gpu(f);
migraph::verify_args(name, x, y, tolerance);
migraphx::verify_args(name, x, y, tolerance);
// std::cout << "cpu: " << x << std::endl;
// std::cout << "gpu: " << y << std::endl;
}
void verify_instructions(const migraph::program& prog, double tolerance = 80)
void verify_instructions(const migraphx::program& prog, double tolerance = 80)
{
for(auto&& ins : prog)
{
......@@ -68,8 +69,8 @@ void verify_instructions(const migraph::program& prog, double tolerance = 80)
if(ins.name() == "reshape")
continue;
auto create_program = [&] {
migraph::program p;
std::vector<migraph::instruction_ref> inputs;
migraphx::program p;
std::vector<migraphx::instruction_ref> inputs;
for(auto&& arg : ins.inputs())
{
if(arg->name() == "@literal")
......@@ -100,8 +101,8 @@ void verify_reduced(F f, int n, double tolerance = 80)
{
auto create_program = [&] {
migraph::program p = f();
auto last = std::prev(p.end(), n + 1);
migraphx::program p = f();
auto last = std::prev(p.end(), n + 1);
p.remove_instructions(last, p.end());
return p;
};
......@@ -113,8 +114,8 @@ void verify_reduced(F f, int n, double tolerance = 80)
template <class F>
void verify_reduced_program(F f, double tolerance = 80)
{
migraph::program p = f();
auto n = std::distance(p.begin(), p.end());
migraphx::program p = f();
auto n = std::distance(p.begin(), p.end());
for(int i = 0; i < n; i++)
{
verify_reduced(f, i, tolerance);
......@@ -127,7 +128,7 @@ int main(int argc, char const* argv[])
if(not args.empty())
{
std::string file = args.front();
auto p = migraph::parse_onnx(file);
auto p = migraphx::parse_onnx(file);
std::cout << p << std::endl;
if(std::any_of(args.begin(), args.end(), [](const auto& s) { return s == "-i"; }))
......@@ -136,11 +137,11 @@ int main(int argc, char const* argv[])
}
else if(std::any_of(args.begin(), args.end(), [](const auto& s) { return s == "-r"; }))
{
verify_reduced_program([&] { return migraph::parse_onnx(file); });
verify_reduced_program([&] { return migraphx::parse_onnx(file); });
}
else
{
verify_program(file, [&] { return migraph::parse_onnx(file); });
verify_program(file, [&] { return migraphx::parse_onnx(file); });
}
}
}
#ifndef MIGRAPH_GUARD_RTGLIB_COMMON_HEADER_HPP
#define MIGRAPH_GUARD_RTGLIB_COMMON_HEADER_HPP
#include <migraph/program.hpp>
#include <migraph/stringutils.hpp>
#include <migraph/instruction.hpp>
#include <migraph/operators.hpp>
#include <migraph/iterator_for.hpp>
#include <migraph/pass_config.hpp>
#include <migraph/config.hpp>
#include <migraphx/program.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/pass_config.hpp>
#include <migraphx/config.hpp>
#include <set>
#include <list>
#include <vector>
#include <queue>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
//#define MIGRAPH_DEBUG_OPT
......@@ -25,6 +25,6 @@ inline namespace MIGRAPH_INLINE_NS {
#endif // MIGRAPH_DEBUG_OPT
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif // MIGRAPH_GUARD_RTGLIB_COMMON_HEADER_HPP
#include <migraph/memory_coloring.hpp>
#include <migraphx/memory_coloring.hpp>
#include "memory_coloring_impl.hpp"
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
void memory_coloring::apply(program& p) const
......@@ -14,4 +14,4 @@ void memory_coloring::apply(program& p) const
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include "memory_coloring_impl.hpp"
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
void memory_coloring_impl::run()
......@@ -335,4 +335,4 @@ void live_interval::dump()
#endif
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#ifndef MIGRAPH_GUARD_RTGLIB_MEMORY_COLORING_IMPL_HPP
#define MIGRAPH_GUARD_RTGLIB_MEMORY_COLORING_IMPL_HPP
#include "common_header.hpp"
#include <migraph/config.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
static const int invalid_offset = -1;
......@@ -155,5 +155,5 @@ struct memory_coloring_impl
};
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#endif
#include <migraph/program.hpp>
#include <migraph/stringutils.hpp>
#include <migraph/instruction.hpp>
#include <migraph/env.hpp>
#include <migraph/ranges.hpp>
#include <migraph/time.hpp>
#include <migraph/iterator_for.hpp>
#include <migraphx/program.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/env.hpp>
#include <migraphx/ranges.hpp>
#include <migraphx/time.hpp>
#include <migraphx/iterator_for.hpp>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <utility>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
MIGRAPH_DECLARE_ENV_VAR(MIGRAPH_TRACE_COMPILE)
......@@ -502,4 +502,4 @@ std::ostream& operator<<(std::ostream& os, const program& p)
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include <migraph/shape.hpp>
#include <migraph/stringutils.hpp>
#include <migraphx/shape.hpp>
#include <migraphx/stringutils.hpp>
#include <numeric>
#include <algorithm>
#include <functional>
#include <iostream>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
struct shape_impl
......@@ -192,4 +192,4 @@ std::ostream& operator<<(std::ostream& os, const shape& x)
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include <migraph/simplify_algebra.hpp>
#include <migraph/program.hpp>
#include <migraph/operators.hpp>
#include <migraph/matcher.hpp>
#include <migraph/literal.hpp>
#include <migraphx/simplify_algebra.hpp>
#include <migraphx/program.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/matcher.hpp>
#include <migraphx/literal.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
struct find_add_lit_broadcast
......@@ -62,4 +62,4 @@ struct find_add_lit_broadcast
void simplify_algebra::apply(program& p) const { match::find_matches(p, find_add_lit_broadcast{}); }
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#include <migraph/simplify_reshapes.hpp>
#include <migraph/program.hpp>
#include <migraph/instruction.hpp>
#include <migraph/operators.hpp>
#include <migraph/iterator_for.hpp>
#include <migraph/ranges.hpp>
#include <migraphx/simplify_reshapes.hpp>
#include <migraphx/program.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/operators.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/ranges.hpp>
#include <unordered_set>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
bool is_reshaper(const std::string& name)
......@@ -61,4 +61,4 @@ void simplify_reshapes::apply(program& p) const
}
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
add_library(migraph_cpu
add_library(migraphx_cpu
target.cpp
lowering.cpp
gemm.cpp
)
set_target_properties(migraph_cpu PROPERTIES EXPORT_NAME cpu)
set_target_properties(migraphx_cpu PROPERTIES EXPORT_NAME cpu)
find_path(BLAZE_INCLUDE blaze/Blaze.h)
find_package(Threads)
rocm_clang_tidy_check(migraph_cpu)
target_link_libraries(migraph_cpu migraph Threads::Threads)
target_include_directories(migraph_cpu PRIVATE ${BLAZE_INCLUDE})
target_compile_definitions(migraph_cpu PRIVATE -DBLAZE_USE_CPP_THREADS)
rocm_clang_tidy_check(migraphx_cpu)
target_link_libraries(migraphx_cpu migraphx Threads::Threads)
target_include_directories(migraphx_cpu PRIVATE ${BLAZE_INCLUDE})
target_compile_definitions(migraphx_cpu PRIVATE -DBLAZE_USE_CPP_THREADS)
rocm_install_targets(
TARGETS migraph_cpu
TARGETS migraphx_cpu
INCLUDE
${CMAKE_CURRENT_SOURCE_DIR}/include
)
......
#include <migraph/cpu/gemm.hpp>
#include <migraph/dfor.hpp>
#include <migraph/requires.hpp>
#include <migraphx/cpu/gemm.hpp>
#include <migraphx/dfor.hpp>
#include <migraphx/requires.hpp>
#include <blaze/math/CustomMatrix.h>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace cpu {
......@@ -95,4 +95,4 @@ void migemm(
} // namespace cpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#ifndef MIGRAPH_GUARD_RTGLIB_CONTEXT_HPP
#define MIGRAPH_GUARD_RTGLIB_CONTEXT_HPP
#include <migraph/config.hpp>
#include <migraphx/config.hpp>
namespace migraph {
namespace migraphx {
inline namespace MIGRAPH_INLINE_NS {
namespace cpu {
......@@ -14,6 +14,6 @@ struct context
} // namespace cpu
} // namespace MIGRAPH_INLINE_NS
} // namespace migraph
} // namespace migraphx
#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