Unverified Commit 7ab06956 authored by Paul Fultz II's avatar Paul Fultz II Committed by GitHub
Browse files

Compute dominators (#525)



* rename merge_from to merge_to

* refine comments

* code backup

* clang format

* The first version that can reduce scratch memory usage

* code backup

* clang format

* code backup

* clang format

* fixed a bug related to removing gemm copy

* clang format

* code backup

* clang format

* fix review comments

* clang format

* fix unit test failure

* code backup

* clang format

* code base for further investigation

* code with both the forward and backward approach to compute the conflict table

* clang format

* clang format

* backup changes

* remove unnecessary file

* remove unnecessary code

* code backup

* clang format

* code backup

* clang format'

* fix a bug in the code

* clang format

* code backup

* clang format

* remove unused code

* remove unused code

* rename some functions

* remove print code

* code backup

* add dominator to scheduling

* add dominator algorithm to remove unnecessary conflicts

* Remove comment

* Use erase_if instead

* Formatting

* Code clean up:

* Formatting

* Add dominator info class

* Formatting

* Add dom_info

* Formatting

* Add test case and fix some bugs

* Formatting

* Add unit test for scheduler

* Formatting

* Use index map instead of distance

* Formatting

* Add memory coloring test

* Check for conflict in memory coloring

* Formatting

* Use 1 stream by default

* Update to use modules

* Formatting

* Skip live on entry check

* Formatting

* Formatting

* Fix tidy warning

* Fix tidy warning

* Formatting

* Add nolint

* Use C++17 to build everything when using clang

* Remove input names

* Formatting

* Remove input names

* Keep order of params

* Formatting
Co-authored-by: default avatarShucai Xiao <Shucai.Xiao@amd.com>
Co-authored-by: default avatarmvermeulen <5479696+mvermeulen@users.noreply.github.com>
parent e8738144
...@@ -95,4 +95,5 @@ ENV LD_LIBRARY_PATH=$PREFIX/lib ...@@ -95,4 +95,5 @@ ENV LD_LIBRARY_PATH=$PREFIX/lib
# Setup ubsan environment to printstacktrace # Setup ubsan environment to printstacktrace
ENV UBSAN_OPTIONS=print_stacktrace=1 ENV UBSAN_OPTIONS=print_stacktrace=1
ENV ASAN_OPTIONS=detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1 ENV ASAN_OPTIONS=detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1
RUN ln -s /opt/rocm/llvm/bin/llvm-symbolizer /usr/bin/llvm-symbolizer
...@@ -15,6 +15,7 @@ add_library(migraphx ...@@ -15,6 +15,7 @@ add_library(migraphx
compile_src.cpp compile_src.cpp
cpp_generator.cpp cpp_generator.cpp
dead_code_elimination.cpp dead_code_elimination.cpp
dom_info.cpp
dynamic_loader.cpp dynamic_loader.cpp
eliminate_allocation.cpp eliminate_allocation.cpp
eliminate_contiguous.cpp eliminate_contiguous.cpp
......
#include <migraphx/dom_info.hpp>
#include <migraphx/program.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/erase.hpp>
#include <migraphx/ranges.hpp>
#include <unordered_set>
namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
bool dominator_info::strictly_dominate(instruction_ref ins1, instruction_ref ins2)
{
if(ins1 == ins2)
return false;
auto iter = ins2idom.find(ins2);
while(iter != ins2idom.end())
{
if(ins1 == iter->second)
return true;
assert(iter != ins2idom.find(iter->second));
iter = ins2idom.find(iter->second);
}
return false;
}
struct module_visitor
{
module* mm;
module& get_nodes() const { return *mm; }
const std::vector<instruction_ref>& get_children(instruction_ref ins) { return ins->inputs(); }
};
template <class Visitor>
dominator_info compute_dominator_generic(Visitor v)
{
dominator_info info;
std::unordered_map<instruction_ref, std::unordered_set<instruction_ref>> instr2_doms;
for(instruction_ref ins : iterator_for(v.get_nodes()))
{
const std::vector<instruction_ref>& children = v.get_children(ins);
if(children.size() == 1)
{
info.ins2idom[ins] = children.front();
instr2_doms[ins].insert(children.front());
}
else if(children.size() > 1)
{
auto&& doms = instr2_doms[ins];
doms = instr2_doms[children.front()];
std::for_each(children.begin() + 1, children.end(), [&](instruction_ref child) {
auto&& child_doms = instr2_doms[child];
erase_if(doms, [&](auto x) { return not contains(child_doms, x); });
});
auto iter = std::find_if(doms.begin(), doms.end(), [&](auto dom1) {
return std::none_of(doms.begin(), doms.end(), [&](auto dom2) {
if(dom1 == dom2)
return false;
return info.strictly_dominate(dom1, dom2);
});
});
if(iter != doms.end())
info.ins2idom[ins] = *iter;
}
instr2_doms[ins].insert(ins);
}
return info;
}
dominator_info compute_dominator(module& m)
{
return compute_dominator_generic(module_visitor{&m});
}
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
...@@ -43,6 +43,7 @@ struct outline ...@@ -43,6 +43,7 @@ struct outline
struct param struct param
{ {
std::string parameter; std::string parameter;
uint32_t order = 0;
template <class Self, class F> template <class Self, class F>
static auto reflect(Self& self, F f) static auto reflect(Self& self, F f)
......
#ifndef MIGRAPHX_GUARD_RTGLIB_DOM_INFO_HPP
#define MIGRAPHX_GUARD_RTGLIB_DOM_INFO_HPP
#include <migraphx/config.hpp>
#include <migraphx/instruction.hpp>
#include <unordered_map>
namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
struct module;
struct dominator_info
{
bool strictly_dominate(instruction_ref ins1, instruction_ref ins2);
std::unordered_map<instruction_ref, instruction_ref> ins2idom;
};
dominator_info compute_dominator(module& m);
// dominator_info compute_dominator_naive(const module& m);
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx
#endif
...@@ -25,12 +25,19 @@ auto erase(R&& r, const T& value) ...@@ -25,12 +25,19 @@ auto erase(R&& r, const T& value)
* *
* @param r The container to erase elements from * @param r The container to erase elements from
* @param pred Predicate function that selects which elements should be erased. * @param pred Predicate function that selects which elements should be erased.
* @return Returns iterator to erased element
*/ */
template <class R, class P> template <class R, class P>
auto erase_if(R&& r, P&& pred) void erase_if(R&& r, P&& pred)
{ {
return r.erase(std::remove_if(r.begin(), r.end(), pred), r.end()); auto first = r.begin();
auto last = r.end();
while(first != last)
{
if(pred(*first))
first = r.erase(first);
else
first++;
}
} }
} // namespace MIGRAPHX_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
......
...@@ -25,8 +25,8 @@ struct module_impl ...@@ -25,8 +25,8 @@ struct module_impl
// A list is used to keep references to an instruction stable // A list is used to keep references to an instruction stable
std::list<instruction> instructions; std::list<instruction> instructions;
std::unordered_set<instruction*> instruction_set; std::unordered_set<instruction*> instruction_set;
std::vector<std::string> input_names;
std::string name; std::string name;
uint32_t nparams = 0;
bool contains(instruction_ref ins) const bool contains(instruction_ref ins) const
{ {
...@@ -110,7 +110,6 @@ void module::assign(const module& m) ...@@ -110,7 +110,6 @@ void module::assign(const module& m)
{ {
impl->instructions.clear(); impl->instructions.clear();
} }
impl->input_names = m.impl->input_names;
impl->name = m.impl->name; impl->name = m.impl->name;
std::unordered_map<instruction_ref, instruction_ref> ins_map; std::unordered_map<instruction_ref, instruction_ref> ins_map;
...@@ -312,9 +311,8 @@ instruction_ref module::add_outline(const shape& s) ...@@ -312,9 +311,8 @@ instruction_ref module::add_outline(const shape& s)
instruction_ref module::add_parameter(std::string name, shape s) instruction_ref module::add_parameter(std::string name, shape s)
{ {
assert(get_parameter_shape(name) == shape{}); assert(get_parameter_shape(name) == shape{});
impl->input_names.push_back(name); impl->push_front({builtin::param{std::move(name), impl->nparams}, std::move(s), {}});
impl->nparams++;
impl->push_front({builtin::param{std::move(name)}, std::move(s), {}});
return impl->instructions.begin(); return impl->instructions.begin();
} }
...@@ -350,17 +348,21 @@ shape module::get_parameter_shape(std::string name) const ...@@ -350,17 +348,21 @@ shape module::get_parameter_shape(std::string name) const
std::vector<std::string> module::get_parameter_names() const std::vector<std::string> module::get_parameter_names() const
{ {
std::vector<std::string> result = impl->input_names; std::vector<std::string> result;
std::unordered_set<std::string> params; std::vector<builtin::param> params;
for(auto&& ins : impl->instructions) for(auto&& ins : impl->instructions)
{ {
if(ins.name() == "@param") if(ins.name() == "@param")
{ {
auto&& name = any_cast<builtin::param>(ins.get_operator()).parameter; auto&& param = any_cast<builtin::param>(ins.get_operator());
params.insert(name); params.push_back(param);
} }
} }
erase_if(result, [&](auto&& name) { return params.count(name) == 0; }); std::stable_sort(
params.begin(), params.end(), by(std::less<>{}, [](auto&& p) { return p.order; }));
std::transform(params.begin(), params.end(), std::back_inserter(result), [&](auto&& p) {
return p.parameter;
});
return result; return result;
} }
......
...@@ -249,8 +249,8 @@ void memory_coloring_impl::verify() ...@@ -249,8 +249,8 @@ void memory_coloring_impl::verify()
if(segment.begin == invalid_offset) if(segment.begin == invalid_offset)
{ {
if(!interval.is_live_on_entry) // if(!interval.is_live_on_entry)
MIGRAPHX_THROW("interval is not live on entry"); // MIGRAPHX_THROW("interval is not live on entry");
continue; continue;
} }
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <migraphx/par_for.hpp> #include <migraphx/par_for.hpp>
#include <migraphx/functional.hpp> #include <migraphx/functional.hpp>
#include <migraphx/ranges.hpp> #include <migraphx/ranges.hpp>
#include <migraphx/dom_info.hpp>
#include <unordered_map> #include <unordered_map>
#include <unordered_set> #include <unordered_set>
#include <queue> #include <queue>
...@@ -16,6 +17,7 @@ ...@@ -16,6 +17,7 @@
#include <set> #include <set>
#include <deque> #include <deque>
#include <chrono> #include <chrono>
#include <iomanip>
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
...@@ -88,7 +90,7 @@ struct stream_info ...@@ -88,7 +90,7 @@ struct stream_info
return args.end(); return args.end();
} }
const std::size_t min_partition_threshold = 1; const std::size_t min_partition_threshold = 2;
sort_args_by_weight(args, std::greater<>{}); sort_args_by_weight(args, std::greater<>{});
auto it = std::lower_bound(std::next(args.begin()), auto it = std::lower_bound(std::next(args.begin()),
...@@ -353,6 +355,7 @@ struct stream_info ...@@ -353,6 +355,7 @@ struct stream_info
{ {
std::unordered_map<instruction_ref, std::vector<std::vector<instruction_ref>>> result; std::unordered_map<instruction_ref, std::vector<std::vector<instruction_ref>>> result;
std::unordered_map<instruction_ref, std::unordered_set<instruction_ref>> merge_from; std::unordered_map<instruction_ref, std::unordered_set<instruction_ref>> merge_from;
dominator_info di = compute_dominator(p);
result.reserve(p.size()); result.reserve(p.size());
merge_from.reserve(p.size()); merge_from.reserve(p.size());
for(auto ins : reverse_iterator_for(p)) for(auto ins : reverse_iterator_for(p))
...@@ -366,8 +369,13 @@ struct stream_info ...@@ -366,8 +369,13 @@ struct stream_info
merge_from[ins].insert(merge_from[arg].begin(), merge_from[arg].end()); merge_from[ins].insert(merge_from[arg].begin(), merge_from[arg].end());
} }
auto streams = this->get_streams(ins); if(is_split_point(ins))
{
erase_if(merge_from[ins],
[&](auto merge) { return di.strictly_dominate(ins, merge); });
}
auto streams = this->get_streams(ins);
// Collect concur instructions for each merge point. // Collect concur instructions for each merge point.
for(const auto& merge : merge_from[ins]) for(const auto& merge : merge_from[ins])
{ {
...@@ -396,11 +404,18 @@ struct stream_info ...@@ -396,11 +404,18 @@ struct stream_info
std::unordered_map<instruction_ref, std::unordered_set<instruction_ref>> std::unordered_map<instruction_ref, std::unordered_set<instruction_ref>>
get_conflicts(module& p) get_conflicts(module& p)
{ {
using conflict_table_type = using conflict_table_type =
std::unordered_map<instruction_ref, std::unordered_set<instruction_ref>>; std::unordered_map<instruction_ref, std::unordered_set<instruction_ref>>;
conflict_table_type conflict_table; conflict_table_type conflict_table;
auto concur_ins = this->find_concurrent_instructions(p); auto concur_ins = this->find_concurrent_instructions(p);
// Compute an index for each instruction
std::unordered_map<instruction_ref, std::size_t> ins2index;
std::size_t index_total = 0;
for(auto ins : iterator_for(p))
ins2index[ins] = index_total++;
std::vector<conflict_table_type> thread_conflict_tables( std::vector<conflict_table_type> thread_conflict_tables(
std::thread::hardware_concurrency()); std::thread::hardware_concurrency());
std::vector<instruction_ref> index_to_ins; std::vector<instruction_ref> index_to_ins;
...@@ -442,14 +457,13 @@ struct stream_info ...@@ -442,14 +457,13 @@ struct stream_info
for(auto ins1 : ins1_set) for(auto ins1 : ins1_set)
{ {
auto p1 = std::distance(ins1, merge_first); auto p1 = ins2index.at(ins1);
for(auto ins2 : ins2_set) for(auto ins2 : ins2_set)
{ {
if(ins1 == ins2) if(ins1 == ins2)
continue; continue;
auto p2 = std::distance(ins2, merge_first); auto p2 = ins2index.at(ins2);
// The smaller distance means the instruction occurs later if(p2 > p1)
if(p1 > p2)
thrd_table[ins2].insert(ins1); thrd_table[ins2].insert(ins1);
else else
thrd_table[ins1].insert(ins2); thrd_table[ins1].insert(ins2);
......
#include <migraphx/dom_info.hpp>
#include <migraphx/program.hpp>
#include <basic_ops.hpp>
#include <test.hpp>
TEST_CASE(dom1)
{
migraphx::module mm;
auto ins1 = mm.add_parameter("entry", {migraphx::shape::float_type});
auto ins2 = mm.add_instruction(pass_op{}, ins1);
auto ins3 = mm.add_instruction(pass_op{}, ins2);
auto ins4 = mm.add_instruction(pass_op{}, ins2);
auto ins5 = mm.add_instruction(pass_op{}, ins3, ins4);
auto ins6 = mm.add_instruction(pass_op{}, ins2);
auto dom = migraphx::compute_dominator(mm);
EXPECT(dom.strictly_dominate(ins1, ins2));
EXPECT(dom.strictly_dominate(ins2, ins3));
EXPECT(dom.strictly_dominate(ins2, ins4));
EXPECT(dom.strictly_dominate(ins2, ins5));
EXPECT(dom.strictly_dominate(ins2, ins6));
EXPECT(not dom.strictly_dominate(ins3, ins6));
EXPECT(not dom.strictly_dominate(ins4, ins6));
EXPECT(not dom.strictly_dominate(ins3, ins5));
EXPECT(not dom.strictly_dominate(ins4, ins5));
}
int main(int argc, const char* argv[]) { test::run(argc, argv); }
...@@ -79,8 +79,7 @@ struct pass_op ...@@ -79,8 +79,7 @@ struct pass_op
return {}; return {};
return inputs.front(); return inputs.front();
} }
int output_alias(const std::vector<migraphx::shape>& s) const { return s.empty() ? -1 : 0; }
int output_alias(const std::vector<migraphx::shape>&) const { return 0; }
}; };
struct mod_pass_op struct mod_pass_op
......
...@@ -46,6 +46,39 @@ bool no_allocate(const migraphx::module& m) ...@@ -46,6 +46,39 @@ bool no_allocate(const migraphx::module& m)
return std::none_of(m.begin(), m.end(), [](auto&& ins) { return ins.name() == "allocate"; }); return std::none_of(m.begin(), m.end(), [](auto&& ins) { return ins.name() == "allocate"; });
} }
bool is_overlap(std::pair<std::size_t, std::size_t> x, std::pair<std::size_t, std::size_t> y)
{
return std::max(x.first, y.first) < std::min(x.second, y.second);
}
std::pair<std::size_t, std::size_t> get_load_interval(migraphx::instruction_ref a)
{
auto v = a->get_operator().to_value();
auto offset = v.at("offset").to<std::size_t>();
auto s = migraphx::from_value<migraphx::shape>(v.at("shape"));
return {offset, offset + s.bytes()};
}
bool is_overlap_load(migraphx::instruction_ref a, migraphx::instruction_ref b)
{
return is_overlap(get_load_interval(a), get_load_interval(b));
}
bool is_disjoint(const std::vector<migraphx::instruction_ref>& inss)
{
for(auto ins1 : inss)
{
for(auto ins2 : inss)
{
if(ins1 == ins2)
continue;
if(is_overlap_load(ins1, ins2))
return false;
}
}
return true;
}
TEST_CASE(test1) TEST_CASE(test1)
{ {
migraphx::module m; migraphx::module m;
...@@ -57,6 +90,7 @@ TEST_CASE(test1) ...@@ -57,6 +90,7 @@ TEST_CASE(test1)
run_pass(m); run_pass(m);
CHECK(m.get_parameter_shape("scratch").bytes() == 192); CHECK(m.get_parameter_shape("scratch").bytes() == 192);
CHECK(no_allocate(m)); CHECK(no_allocate(m));
CHECK(is_disjoint({a1, a2}));
} }
TEST_CASE(test2) TEST_CASE(test2)
...@@ -680,6 +714,3047 @@ TEST_CASE(test39) ...@@ -680,6 +714,3047 @@ TEST_CASE(test39)
CHECK(no_allocate(*else_mod)); CHECK(no_allocate(*else_mod));
} }
// NOLINTNEXTLINE
TEST_CASE(rnn_dom)
{
migraphx::module m;
auto mx0 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 10}});
auto mx1 = m.add_instruction(pass_op{});
auto mr = m.add_parameter("r", migraphx::shape{migraphx::shape::float_type, {1, 15, 5}});
auto mx2 = m.add_instruction(pass_op{}, mr);
auto mx3 = m.add_instruction(pass_op{}, mx2);
auto mx4 = m.add_instruction(pass_op{}, mx3);
m.add_instruction(pass_op{});
auto mx6 = m.add_instruction(pass_op{}, mx0, mx1, mx4);
m.add_instruction(pass_op{});
auto mx8 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 15}});
m.add_instruction(pass_op{}, mx8, mx1, mx0, mx6);
auto mseq = m.add_parameter("seq", migraphx::shape{migraphx::shape::float_type, {3, 2, 8}});
auto mx10 = m.add_instruction(pass_op{}, mseq);
auto mx11 = m.add_instruction(pass_op{}, mx10);
auto mw = m.add_parameter("w", migraphx::shape{migraphx::shape::float_type, {1, 15, 8}});
auto mx12 = m.add_instruction(pass_op{}, mw);
auto mx13 = m.add_instruction(pass_op{}, mx12);
m.add_instruction(pass_op{});
auto mx15 = m.add_instruction(pass_op{}, mx8, mx11, mx13);
m.add_instruction(pass_op{}, mx15, mx1, mx0, mx6);
m.add_instruction(pass_op{});
auto mx18 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{}, mx18, mx6, mx15, mx0, mx1, mx8);
auto mx20 = m.add_instruction(pass_op{}, mx6);
m.add_instruction(pass_op{}, mx20, mx8, mx15, mx18);
auto mx22 = m.add_instruction(pass_op{}, mx15);
m.add_instruction(pass_op{}, mx22, mx1, mx0, mx20, mx6, mx18);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx27 = m.add_instruction(pass_op{}, mx18, mx22, mx20);
m.add_instruction(pass_op{}, mx27, mx15, mx8, mx6, mx20, mx1, mx22, mx0);
m.add_instruction(pass_op{});
auto mx30 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{}, mx30, mx20, mx22, mx1, mx15, mx8, mx6, mx27, mx0, mx18);
auto mx32 = m.add_instruction(pass_op{}, mx15);
m.add_instruction(pass_op{}, mx32, mx20, mx30, mx0, mx18, mx1, mx27, mx6);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx36 = m.add_instruction(pass_op{}, mx30, mx32);
m.add_instruction(pass_op{}, mx36, mx32, mx0, mx27, mx8, mx1, mx15, mx6, mx20, mx22, mx18);
auto mx38 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{}, mx38, mx32, mx0, mx27, mx8, mx1, mx15, mx6, mx20, mx22, mx18);
auto mx40 = m.add_instruction(pass_op{}, mx38, mx36);
m.add_instruction(pass_op{}, mx40, mx32, mx0, mx27, mx8, mx1, mx15, mx6, mx20, mx22, mx18);
m.add_instruction(pass_op{});
auto mx43 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{}, mx43, mx15, mx32, mx27, mx30, mx18, mx8, mx40, mx36, mx22, mx38);
auto mx45 = m.add_instruction(pass_op{}, mx6);
m.add_instruction(pass_op{}, mx45, mx32, mx27, mx30, mx18, mx40, mx36, mx22, mx8, mx15, mx38);
auto mx47 = m.add_instruction(pass_op{}, mx15);
m.add_instruction(
pass_op{}, mx47, mx30, mx18, mx43, mx6, mx1, mx45, mx0, mx27, mx36, mx20, mx40, mx38);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx51 = m.add_instruction(pass_op{}, mx43, mx47, mx45);
m.add_instruction(
pass_op{}, mx51, mx15, mx47, mx32, mx27, mx30, mx18, mx8, mx36, mx22, mx40, mx38);
auto mx53 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(
pass_op{}, mx53, mx15, mx47, mx32, mx27, mx30, mx18, mx8, mx36, mx22, mx40, mx38);
auto mx55 = m.add_instruction(pass_op{}, mx53, mx51, mx1);
m.add_instruction(
pass_op{}, mx55, mx15, mx47, mx32, mx27, mx30, mx18, mx8, mx36, mx22, mx40, mx38);
auto mx57 = m.add_instruction(pass_op{}, mx3);
m.add_instruction(pass_op{});
auto mx59 = m.add_instruction(pass_op{}, mx40, mx55, mx57, mx40);
m.add_instruction(
pass_op{}, mx59, mx15, mx8, mx38, mx18, mx30, mx27, mx47, mx32, mx40, mx36, mx22);
auto mx61 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx61,
mx30,
mx15,
mx1,
mx51,
mx20,
mx59,
mx32,
mx45,
mx22,
mx8,
mx47,
mx40,
mx53,
mx6,
mx55,
mx0,
mx43,
mx38,
mx36);
m.add_instruction(pass_op{});
auto mx64 = m.add_instruction(pass_op{}, mx61, mx27, mx1);
m.add_instruction(pass_op{},
mx64,
mx30,
mx15,
mx1,
mx51,
mx20,
mx59,
mx32,
mx45,
mx22,
mx8,
mx47,
mx40,
mx53,
mx6,
mx55,
mx0,
mx43,
mx38,
mx36);
m.add_instruction(pass_op{});
auto mx67 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx67,
mx18,
mx6,
mx1,
mx51,
mx20,
mx59,
mx27,
mx55,
mx43,
mx38,
mx0,
mx61,
mx45,
mx36,
mx40,
mx53,
mx64,
mx30);
auto mx69 = m.add_instruction(pass_op{});
m.add_instruction(pass_op{},
mx69,
mx18,
mx6,
mx1,
mx51,
mx20,
mx59,
mx27,
mx55,
mx43,
mx38,
mx0,
mx61,
mx45,
mx36,
mx40,
mx53,
mx64,
mx30);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx73 = m.add_instruction(pass_op{}, mx67, mx69, mx27);
m.add_instruction(pass_op{},
mx73,
mx18,
mx6,
mx1,
mx51,
mx20,
mx59,
mx27,
mx55,
mx43,
mx38,
mx0,
mx61,
mx45,
mx36,
mx40,
mx53,
mx64,
mx30);
m.add_instruction(pass_op{});
auto mx76 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx76,
mx64,
mx30,
mx18,
mx40,
mx8,
mx61,
mx38,
mx69,
mx67,
mx73,
mx27,
mx47,
mx32,
mx36,
mx15,
mx22);
m.add_instruction(pass_op{});
auto mx79 = m.add_instruction(pass_op{}, mx76, mx59);
m.add_instruction(pass_op{},
mx79,
mx64,
mx30,
mx18,
mx40,
mx8,
mx61,
mx38,
mx69,
mx67,
mx73,
mx27,
mx47,
mx32,
mx36,
mx15,
mx22);
auto mx81 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx81,
mx36,
mx32,
mx27,
mx47,
mx18,
mx30,
mx73,
mx67,
mx22,
mx15,
mx61,
mx8,
mx64,
mx40,
mx69,
mx38);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx85 = m.add_instruction(pass_op{}, mx81, mx73, mx79, mx64);
m.add_instruction(pass_op{},
mx85,
mx36,
mx32,
mx27,
mx47,
mx18,
mx30,
mx73,
mx67,
mx22,
mx15,
mx61,
mx8,
mx64,
mx40,
mx69,
mx38);
m.add_instruction(pass_op{});
auto mx88 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 10}});
m.add_instruction(pass_op{},
mx88,
mx36,
mx32,
mx27,
mx47,
mx18,
mx30,
mx73,
mx67,
mx22,
mx15,
mx61,
mx8,
mx64,
mx40,
mx69,
mx38);
auto mx90 = m.add_instruction(pass_op{}, mx88, mx85, mx4);
m.add_instruction(pass_op{},
mx90,
mx36,
mx32,
mx27,
mx47,
mx18,
mx30,
mx73,
mx67,
mx22,
mx15,
mx61,
mx8,
mx64,
mx40,
mx69,
mx38);
m.add_instruction(pass_op{});
auto mx93 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 15}});
m.add_instruction(pass_op{},
mx93,
mx51,
mx88,
mx20,
mx64,
mx43,
mx61,
mx53,
mx81,
mx47,
mx6,
mx45,
mx0,
mx55,
mx18,
mx76,
mx1,
mx79,
mx85,
mx90,
mx8,
mx69,
mx67,
mx73,
mx32,
mx59,
mx22,
mx15,
mx27);
auto mx95 = m.add_instruction(pass_op{}, mseq);
auto mx96 = m.add_instruction(pass_op{}, mx95);
m.add_instruction(pass_op{});
auto mx98 = m.add_instruction(pass_op{}, mx93, mx96, mx13);
m.add_instruction(pass_op{},
mx98,
mx51,
mx88,
mx20,
mx64,
mx43,
mx61,
mx53,
mx81,
mx47,
mx6,
mx45,
mx0,
mx55,
mx18,
mx76,
mx1,
mx79,
mx85,
mx90,
mx8,
mx69,
mx67,
mx73,
mx32,
mx59,
mx22,
mx15,
mx27);
m.add_instruction(pass_op{});
auto mx101 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx101,
mx43,
mx40,
mx53,
mx59,
mx51,
mx6,
mx61,
mx81,
mx38,
mx45,
mx20,
mx0,
mx76,
mx55,
mx18,
mx85,
mx1,
mx93,
mx79,
mx90,
mx27,
mx88,
mx64,
mx30,
mx98,
mx36);
auto mx103 = m.add_instruction(pass_op{}, mx90);
m.add_instruction(pass_op{},
mx103,
mx64,
mx101,
mx15,
mx67,
mx73,
mx18,
mx40,
mx8,
mx47,
mx98,
mx27,
mx32,
mx61,
mx22,
mx93,
mx69,
mx36,
mx38,
mx30);
auto mx105 = m.add_instruction(pass_op{}, mx98);
m.add_instruction(pass_op{},
mx105,
mx43,
mx88,
mx53,
mx64,
mx59,
mx6,
mx76,
mx61,
mx81,
mx47,
mx103,
mx22,
mx45,
mx0,
mx55,
mx18,
mx85,
mx51,
mx20,
mx1,
mx79,
mx90,
mx8,
mx101,
mx15,
mx69,
mx67,
mx73,
mx32,
mx27);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx110 = m.add_instruction(pass_op{}, mx101, mx105, mx103);
m.add_instruction(pass_op{},
mx110,
mx88,
mx40,
mx93,
mx59,
mx43,
mx61,
mx53,
mx81,
mx103,
mx6,
mx45,
mx0,
mx55,
mx18,
mx64,
mx20,
mx76,
mx1,
mx79,
mx38,
mx85,
mx90,
mx27,
mx30,
mx105,
mx98,
mx51,
mx36);
m.add_instruction(pass_op{});
auto mx113 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx113,
mx59,
mx20,
mx51,
mx1,
mx79,
mx90,
mx55,
mx85,
mx76,
mx81,
mx47,
mx6,
mx38,
mx88,
mx43,
mx40,
mx0,
mx45,
mx53,
mx93,
mx8,
mx101,
mx15,
mx69,
mx67,
mx73,
mx32,
mx110,
mx22,
mx103,
mx30,
mx36,
mx98,
mx105);
auto mx115 = m.add_instruction(pass_op{}, mx98);
m.add_instruction(pass_op{},
mx115,
mx59,
mx20,
mx51,
mx1,
mx79,
mx90,
mx55,
mx18,
mx85,
mx76,
mx61,
mx81,
mx47,
mx6,
mx88,
mx43,
mx0,
mx45,
mx53,
mx64,
mx8,
mx101,
mx15,
mx69,
mx67,
mx73,
mx113,
mx32,
mx110,
mx22,
mx103,
mx27);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx119 = m.add_instruction(pass_op{}, mx113, mx115);
m.add_instruction(pass_op{},
mx119,
mx59,
mx20,
mx51,
mx1,
mx79,
mx90,
mx55,
mx85,
mx76,
mx81,
mx47,
mx6,
mx38,
mx88,
mx43,
mx40,
mx0,
mx45,
mx53,
mx93,
mx8,
mx101,
mx15,
mx69,
mx67,
mx73,
mx32,
mx110,
mx22,
mx103,
mx30,
mx36,
mx115,
mx98,
mx105);
auto mx121 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx121,
mx59,
mx20,
mx51,
mx1,
mx79,
mx90,
mx55,
mx85,
mx76,
mx81,
mx47,
mx6,
mx38,
mx88,
mx43,
mx40,
mx0,
mx45,
mx53,
mx93,
mx8,
mx101,
mx15,
mx69,
mx67,
mx73,
mx32,
mx110,
mx22,
mx103,
mx30,
mx36,
mx115,
mx98,
mx105);
auto mx123 = m.add_instruction(pass_op{}, mx121, mx119);
m.add_instruction(pass_op{},
mx123,
mx59,
mx20,
mx51,
mx1,
mx79,
mx90,
mx55,
mx85,
mx76,
mx81,
mx47,
mx6,
mx38,
mx88,
mx43,
mx40,
mx0,
mx45,
mx53,
mx93,
mx8,
mx101,
mx15,
mx69,
mx67,
mx73,
mx32,
mx110,
mx22,
mx103,
mx30,
mx36,
mx115,
mx98,
mx105);
m.add_instruction(pass_op{});
auto mx126 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx126,
mx115,
mx113,
mx8,
mx67,
mx61,
mx73,
mx18,
mx123,
mx119,
mx32,
mx15,
mx36,
mx110,
mx27,
mx101,
mx22,
mx98,
mx47,
mx40,
mx93,
mx38,
mx69,
mx121,
mx64,
mx30,
mx105);
auto mx128 = m.add_instruction(pass_op{}, mx90);
m.add_instruction(pass_op{},
mx128,
mx93,
mx98,
mx8,
mx67,
mx73,
mx18,
mx123,
mx61,
mx40,
mx47,
mx27,
mx32,
mx101,
mx22,
mx15,
mx110,
mx36,
mx119,
mx38,
mx64,
mx30,
mx69,
mx121,
mx113,
mx115,
mx105);
auto mx130 = m.add_instruction(pass_op{}, mx98);
m.add_instruction(pass_op{},
mx130,
mx119,
mx64,
mx22,
mx110,
mx126,
mx128,
mx121,
mx113,
mx67,
mx90,
mx69,
mx15,
mx20,
mx8,
mx27,
mx51,
mx85,
mx79,
mx123,
mx103,
mx18,
mx55,
mx32,
mx0,
mx45,
mx61,
mx53,
mx76,
mx6,
mx47,
mx59,
mx73,
mx81,
mx88,
mx1,
mx43,
mx101);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx134 = m.add_instruction(pass_op{}, mx126, mx130, mx128);
m.add_instruction(pass_op{},
mx134,
mx130,
mx8,
mx67,
mx61,
mx73,
mx18,
mx123,
mx119,
mx32,
mx15,
mx36,
mx110,
mx27,
mx101,
mx22,
mx113,
mx115,
mx98,
mx47,
mx40,
mx93,
mx38,
mx69,
mx121,
mx64,
mx30,
mx105);
auto mx136 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx136,
mx130,
mx8,
mx67,
mx61,
mx73,
mx18,
mx123,
mx119,
mx32,
mx15,
mx36,
mx110,
mx27,
mx101,
mx22,
mx113,
mx115,
mx98,
mx47,
mx40,
mx93,
mx38,
mx69,
mx121,
mx64,
mx30,
mx105);
auto mx138 = m.add_instruction(pass_op{}, mx136, mx134, mx85);
m.add_instruction(pass_op{},
mx138,
mx130,
mx8,
mx67,
mx61,
mx73,
mx18,
mx123,
mx119,
mx32,
mx15,
mx36,
mx110,
mx27,
mx101,
mx22,
mx113,
mx115,
mx98,
mx47,
mx40,
mx93,
mx38,
mx69,
mx121,
mx64,
mx30,
mx105);
m.add_instruction(pass_op{});
auto mx141 = m.add_instruction(pass_op{}, mx123, mx138, mx57, mx123);
m.add_instruction(pass_op{},
mx141,
mx113,
mx115,
mx130,
mx105,
mx38,
mx93,
mx61,
mx98,
mx27,
mx64,
mx30,
mx119,
mx121,
mx69,
mx8,
mx67,
mx40,
mx47,
mx32,
mx101,
mx22,
mx36,
mx110,
mx15,
mx73,
mx18,
mx123);
auto mx143 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx143,
mx8,
mx73,
mx121,
mx67,
mx101,
mx110,
mx69,
mx15,
mx138,
mx88,
mx43,
mx79,
mx53,
mx61,
mx45,
mx18,
mx0,
mx6,
mx27,
mx22,
mx134,
mx32,
mx1,
mx119,
mx59,
mx85,
mx103,
mx126,
mx64,
mx128,
mx55,
mx76,
mx47,
mx81,
mx90,
mx136,
mx51,
mx141,
mx20,
mx113,
mx123);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx147 = m.add_instruction(pass_op{}, mx143, mx69, mx110);
m.add_instruction(pass_op{},
mx147,
mx8,
mx73,
mx121,
mx67,
mx101,
mx110,
mx69,
mx15,
mx138,
mx88,
mx43,
mx79,
mx53,
mx61,
mx45,
mx18,
mx0,
mx6,
mx27,
mx22,
mx134,
mx32,
mx1,
mx119,
mx59,
mx85,
mx103,
mx126,
mx64,
mx128,
mx55,
mx76,
mx47,
mx81,
mx90,
mx136,
mx51,
mx141,
mx20,
mx113,
mx123);
m.add_instruction(pass_op{});
auto mx150 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx150,
mx30,
mx121,
mx115,
mx98,
mx130,
mx85,
mx88,
mx90,
mx79,
mx1,
mx93,
mx64,
mx18,
mx53,
mx61,
mx38,
mx27,
mx147,
mx0,
mx6,
mx51,
mx40,
mx134,
mx43,
mx119,
mx59,
mx45,
mx76,
mx128,
mx81,
mx136,
mx55,
mx138,
mx123,
mx126,
mx141,
mx103,
mx20,
mx105,
mx113,
mx143,
mx36);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx154 = m.add_instruction(pass_op{}, mx150, mx110, mx85);
m.add_instruction(pass_op{},
mx154,
mx30,
mx121,
mx115,
mx98,
mx130,
mx85,
mx88,
mx90,
mx79,
mx1,
mx93,
mx64,
mx18,
mx53,
mx61,
mx38,
mx27,
mx147,
mx0,
mx6,
mx51,
mx40,
mx134,
mx43,
mx119,
mx59,
mx45,
mx76,
mx128,
mx81,
mx136,
mx55,
mx138,
mx123,
mx126,
mx141,
mx103,
mx20,
mx105,
mx113,
mx143,
mx36);
m.add_instruction(pass_op{});
auto mx157 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx157,
mx101,
mx8,
mx115,
mx130,
mx105,
mx38,
mx147,
mx93,
mx64,
mx61,
mx98,
mx40,
mx27,
mx121,
mx30,
mx154,
mx113,
mx73,
mx119,
mx36,
mx150,
mx69,
mx67,
mx47,
mx110,
mx32,
mx22,
mx15,
mx18,
mx123,
mx143);
m.add_instruction(pass_op{});
auto mx160 = m.add_instruction(pass_op{}, mx157, mx141);
m.add_instruction(pass_op{},
mx160,
mx101,
mx8,
mx115,
mx130,
mx105,
mx38,
mx147,
mx93,
mx64,
mx61,
mx98,
mx40,
mx27,
mx121,
mx30,
mx154,
mx113,
mx73,
mx119,
mx36,
mx150,
mx69,
mx67,
mx47,
mx110,
mx32,
mx22,
mx15,
mx18,
mx123,
mx143);
auto mx162 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx162,
mx101,
mx8,
mx115,
mx130,
mx105,
mx38,
mx147,
mx93,
mx64,
mx61,
mx98,
mx40,
mx27,
mx121,
mx30,
mx154,
mx113,
mx73,
mx119,
mx36,
mx150,
mx69,
mx67,
mx47,
mx110,
mx32,
mx22,
mx15,
mx18,
mx123,
mx143);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx166 = m.add_instruction(pass_op{}, mx162, mx147, mx160, mx154);
m.add_instruction(pass_op{},
mx166,
mx101,
mx8,
mx115,
mx130,
mx105,
mx38,
mx147,
mx93,
mx64,
mx61,
mx98,
mx40,
mx27,
mx121,
mx30,
mx154,
mx113,
mx73,
mx119,
mx36,
mx150,
mx69,
mx67,
mx47,
mx110,
mx32,
mx22,
mx15,
mx18,
mx123,
mx143);
m.add_instruction(pass_op{});
auto mx169 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 15}});
m.add_instruction(pass_op{},
mx169,
mx154,
mx90,
mx88,
mx79,
mx126,
mx15,
mx103,
mx22,
mx134,
mx166,
mx30,
mx73,
mx20,
mx128,
mx160,
mx8,
mx45,
mx0,
mx6,
mx157,
mx53,
mx136,
mx93,
mx47,
mx81,
mx141,
mx85,
mx110,
mx59,
mx1,
mx162,
mx101,
mx36,
mx38,
mx76,
mx143,
mx67,
mx147,
mx150,
mx138,
mx115,
mx105,
mx51,
mx69,
mx40,
mx32,
mx43,
mx55,
mx130,
mx98);
auto mx171 = m.add_instruction(pass_op{}, mseq);
auto mx172 = m.add_instruction(pass_op{}, mx171);
m.add_instruction(pass_op{});
auto mx174 = m.add_instruction(pass_op{}, mx169, mx172, mx13);
m.add_instruction(pass_op{},
mx174,
mx154,
mx90,
mx88,
mx79,
mx126,
mx15,
mx103,
mx22,
mx134,
mx166,
mx30,
mx73,
mx20,
mx128,
mx160,
mx8,
mx45,
mx0,
mx6,
mx157,
mx53,
mx136,
mx93,
mx47,
mx81,
mx141,
mx85,
mx110,
mx59,
mx1,
mx162,
mx101,
mx36,
mx38,
mx76,
mx143,
mx67,
mx147,
mx150,
mx138,
mx115,
mx105,
mx51,
mx69,
mx40,
mx32,
mx43,
mx55,
mx130,
mx98);
m.add_instruction(pass_op{});
auto mx177 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 10}});
m.add_instruction(pass_op{},
mx177,
mx101,
mx8,
mx115,
mx130,
mx105,
mx38,
mx147,
mx93,
mx64,
mx154,
mx61,
mx98,
mx40,
mx27,
mx174,
mx121,
mx30,
mx113,
mx73,
mx119,
mx36,
mx150,
mx69,
mx67,
mx47,
mx110,
mx32,
mx22,
mx169,
mx15,
mx18,
mx123,
mx143);
m.add_instruction(pass_op{});
auto mx180 = m.add_instruction(pass_op{}, mx177, mx166, mx4);
m.add_instruction(pass_op{},
mx180,
mx101,
mx8,
mx115,
mx130,
mx105,
mx38,
mx147,
mx93,
mx64,
mx154,
mx61,
mx98,
mx40,
mx27,
mx174,
mx121,
mx30,
mx113,
mx73,
mx119,
mx36,
mx150,
mx69,
mx67,
mx47,
mx110,
mx32,
mx22,
mx169,
mx15,
mx18,
mx123,
mx143);
m.add_instruction(pass_op{});
auto mx183 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx183,
mx67,
mx90,
mx150,
mx138,
mx88,
mx79,
mx126,
mx15,
mx103,
mx22,
mx134,
mx180,
mx166,
mx174,
mx73,
mx20,
mx154,
mx32,
mx43,
mx55,
mx157,
mx18,
mx0,
mx113,
mx6,
mx76,
mx53,
mx61,
mx177,
mx136,
mx81,
mx141,
mx85,
mx110,
mx64,
mx45,
mx8,
mx169,
mx59,
mx1,
mx162,
mx101,
mx119,
mx51,
mx69,
mx128,
mx160,
mx27,
mx47,
mx123,
mx121);
auto mx185 = m.add_instruction(pass_op{}, mx180);
m.add_instruction(pass_op{},
mx185,
mx101,
mx8,
mx115,
mx130,
mx105,
mx38,
mx147,
mx93,
mx64,
mx154,
mx61,
mx98,
mx40,
mx27,
mx183,
mx174,
mx121,
mx30,
mx113,
mx73,
mx119,
mx36,
mx150,
mx69,
mx67,
mx47,
mx110,
mx32,
mx22,
mx169,
mx15,
mx18,
mx123,
mx143);
auto mx187 = m.add_instruction(pass_op{}, mx174);
m.add_instruction(pass_op{},
mx187,
mx150,
mx128,
mx67,
mx15,
mx88,
mx43,
mx79,
mx126,
mx103,
mx22,
mx90,
mx180,
mx183,
mx166,
mx141,
mx30,
mx20,
mx59,
mx55,
mx38,
mx160,
mx0,
mx32,
mx85,
mx6,
mx76,
mx157,
mx45,
mx162,
mx138,
mx154,
mx53,
mx177,
mx136,
mx51,
mx47,
mx81,
mx93,
mx73,
mx8,
mx110,
mx101,
mx69,
mx185,
mx36,
mx143,
mx147,
mx134,
mx1,
mx130,
mx115,
mx105,
mx40,
mx98);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx192 = m.add_instruction(pass_op{}, mx183, mx187, mx185);
m.add_instruction(pass_op{},
mx192,
mx150,
mx128,
mx67,
mx187,
mx15,
mx88,
mx43,
mx79,
mx126,
mx103,
mx64,
mx22,
mx90,
mx180,
mx141,
mx20,
mx59,
mx134,
mx1,
mx55,
mx113,
mx160,
mx0,
mx32,
mx85,
mx6,
mx76,
mx157,
mx45,
mx162,
mx138,
mx154,
mx53,
mx61,
mx177,
mx174,
mx136,
mx119,
mx185,
mx51,
mx47,
mx81,
mx73,
mx8,
mx110,
mx18,
mx169,
mx101,
mx69,
mx27,
mx123,
mx166,
mx121);
m.add_instruction(pass_op{});
auto mx195 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx195,
mx115,
mx105,
mx98,
mx123,
mx27,
mx126,
mx103,
mx64,
mx183,
mx174,
mx136,
mx177,
mx141,
mx51,
mx93,
mx113,
mx38,
mx160,
mx55,
mx30,
mx61,
mx138,
mx53,
mx76,
mx85,
mx6,
mx20,
mx59,
mx0,
mx40,
mx43,
mx88,
mx79,
mx180,
mx90,
mx187,
mx81,
mx128,
mx157,
mx45,
mx162,
mx134,
mx1,
mx130,
mx147,
mx166,
mx121,
mx18,
mx169,
mx143,
mx119,
mx36,
mx185,
mx192);
auto mx197 = m.add_instruction(pass_op{}, mx174);
m.add_instruction(pass_op{},
mx197,
mx128,
mx150,
mx101,
mx69,
mx126,
mx103,
mx22,
mx166,
mx183,
mx136,
mx177,
mx141,
mx30,
mx73,
mx93,
mx38,
mx160,
mx55,
mx76,
mx32,
mx85,
mx6,
mx20,
mx59,
mx0,
mx43,
mx15,
mx88,
mx79,
mx180,
mx90,
mx67,
mx81,
mx138,
mx154,
mx53,
mx157,
mx45,
mx162,
mx51,
mx47,
mx195,
mx110,
mx8,
mx143,
mx147,
mx134,
mx1,
mx130,
mx115,
mx105,
mx40,
mx98,
mx36,
mx185,
mx192);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx201 = m.add_instruction(pass_op{}, mx195, mx197);
m.add_instruction(pass_op{},
mx201,
mx115,
mx105,
mx98,
mx123,
mx27,
mx126,
mx103,
mx64,
mx183,
mx174,
mx136,
mx177,
mx141,
mx51,
mx93,
mx113,
mx38,
mx160,
mx55,
mx30,
mx61,
mx138,
mx53,
mx76,
mx85,
mx6,
mx20,
mx59,
mx0,
mx40,
mx43,
mx197,
mx88,
mx79,
mx180,
mx90,
mx187,
mx81,
mx128,
mx157,
mx45,
mx162,
mx134,
mx1,
mx130,
mx147,
mx166,
mx121,
mx18,
mx169,
mx143,
mx119,
mx36,
mx185,
mx192);
auto mx203 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx203,
mx115,
mx105,
mx98,
mx123,
mx27,
mx126,
mx103,
mx64,
mx183,
mx174,
mx136,
mx177,
mx141,
mx51,
mx93,
mx113,
mx38,
mx160,
mx55,
mx30,
mx61,
mx138,
mx53,
mx76,
mx85,
mx6,
mx20,
mx59,
mx0,
mx40,
mx43,
mx197,
mx88,
mx79,
mx180,
mx90,
mx187,
mx81,
mx128,
mx157,
mx45,
mx162,
mx134,
mx1,
mx130,
mx147,
mx166,
mx121,
mx18,
mx169,
mx143,
mx119,
mx36,
mx185,
mx192);
auto mx205 = m.add_instruction(pass_op{}, mx203, mx201);
m.add_instruction(pass_op{},
mx205,
mx115,
mx105,
mx98,
mx123,
mx27,
mx126,
mx103,
mx64,
mx183,
mx174,
mx136,
mx177,
mx141,
mx51,
mx93,
mx113,
mx38,
mx160,
mx55,
mx30,
mx61,
mx138,
mx53,
mx76,
mx85,
mx6,
mx20,
mx59,
mx0,
mx40,
mx43,
mx197,
mx88,
mx79,
mx180,
mx90,
mx187,
mx81,
mx128,
mx157,
mx45,
mx162,
mx134,
mx1,
mx130,
mx147,
mx166,
mx121,
mx18,
mx169,
mx143,
mx119,
mx36,
mx185,
mx192);
m.add_instruction(pass_op{});
auto mx208 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx208,
mx30,
mx40,
mx64,
mx93,
mx18,
mx98,
mx115,
mx143,
mx38,
mx147,
mx183,
mx197,
mx150,
mx119,
mx32,
mx8,
mx105,
mx101,
mx110,
mx195,
mx47,
mx27,
mx22,
mx205,
mx121,
mx67,
mx187,
mx113,
mx73,
mx201,
mx130,
mx203,
mx169,
mx69,
mx15,
mx154,
mx61,
mx174,
mx123,
mx36,
mx192);
auto mx210 = m.add_instruction(pass_op{}, mx180);
m.add_instruction(pass_op{},
mx210,
mx143,
mx115,
mx18,
mx93,
mx150,
mx47,
mx187,
mx15,
mx169,
mx69,
mx205,
mx32,
mx119,
mx113,
mx73,
mx201,
mx30,
mx67,
mx121,
mx22,
mx27,
mx40,
mx98,
mx174,
mx61,
mx154,
mx64,
mx147,
mx38,
mx203,
mx130,
mx8,
mx110,
mx105,
mx101,
mx195,
mx183,
mx197,
mx123,
mx36,
mx192);
auto mx212 = m.add_instruction(pass_op{}, mx174);
m.add_instruction(pass_op{},
mx212,
mx32,
mx67,
mx90,
mx15,
mx138,
mx126,
mx103,
mx38,
mx136,
mx180,
mx141,
mx51,
mx30,
mx22,
mx201,
mx59,
mx134,
mx154,
mx150,
mx1,
mx160,
mx45,
mx6,
mx76,
mx88,
mx53,
mx47,
mx183,
mx81,
mx157,
mx93,
mx79,
mx85,
mx0,
mx210,
mx73,
mx8,
mx110,
mx20,
mx69,
mx177,
mx36,
mx143,
mx162,
mx147,
mx130,
mx115,
mx55,
mx105,
mx40,
mx98,
mx208,
mx203,
mx128,
mx205,
mx195,
mx101,
mx185,
mx43,
mx166,
mx192);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx216 = m.add_instruction(pass_op{}, mx208, mx212, mx210);
m.add_instruction(pass_op{},
mx216,
mx121,
mx30,
mx64,
mx93,
mx123,
mx143,
mx119,
mx36,
mx150,
mx8,
mx101,
mx169,
mx147,
mx110,
mx27,
mx61,
mx40,
mx205,
mx115,
mx32,
mx69,
mx67,
mx98,
mx187,
mx195,
mx73,
mx105,
mx183,
mx197,
mx22,
mx113,
mx201,
mx47,
mx130,
mx154,
mx15,
mx212,
mx18,
mx174,
mx38,
mx203,
mx192);
auto mx218 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx218,
mx121,
mx30,
mx64,
mx93,
mx123,
mx143,
mx119,
mx36,
mx150,
mx8,
mx101,
mx169,
mx147,
mx110,
mx27,
mx61,
mx40,
mx205,
mx115,
mx32,
mx69,
mx67,
mx98,
mx187,
mx195,
mx73,
mx105,
mx183,
mx197,
mx22,
mx113,
mx201,
mx47,
mx130,
mx154,
mx15,
mx212,
mx18,
mx174,
mx38,
mx203,
mx192);
auto mx220 = m.add_instruction(pass_op{}, mx218, mx216, mx166);
m.add_instruction(pass_op{},
mx220,
mx121,
mx30,
mx64,
mx93,
mx123,
mx143,
mx119,
mx36,
mx150,
mx8,
mx101,
mx169,
mx147,
mx110,
mx27,
mx61,
mx40,
mx205,
mx115,
mx32,
mx69,
mx67,
mx98,
mx187,
mx195,
mx73,
mx105,
mx183,
mx197,
mx22,
mx113,
mx201,
mx47,
mx130,
mx154,
mx15,
mx212,
mx18,
mx174,
mx38,
mx203,
mx192);
m.add_instruction(pass_op{});
auto mx223 = m.add_instruction(pass_op{}, mx205, mx220, mx57, mx205);
m.add_instruction(pass_op{},
mx223,
mx38,
mx192,
mx203,
mx130,
mx47,
mx143,
mx123,
mx169,
mx121,
mx147,
mx110,
mx27,
mx36,
mx150,
mx119,
mx101,
mx8,
mx64,
mx61,
mx115,
mx32,
mx69,
mx67,
mx98,
mx187,
mx195,
mx73,
mx105,
mx183,
mx197,
mx22,
mx113,
mx201,
mx174,
mx18,
mx93,
mx205,
mx40,
mx30,
mx154,
mx15,
mx212);
auto mx225 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx225,
mx45,
mx59,
mx76,
mx90,
mx218,
mx67,
mx126,
mx103,
mx136,
mx138,
mx15,
mx32,
mx1,
mx160,
mx150,
mx110,
mx51,
mx30,
mx6,
mx157,
mx93,
mx79,
mx85,
mx88,
mx53,
mx154,
mx134,
mx141,
mx180,
mx38,
mx81,
mx223,
mx183,
mx220,
mx210,
mx0,
mx208,
mx20,
mx69,
mx73,
mx185,
mx101,
mx201,
mx22,
mx203,
mx47,
mx128,
mx205,
mx195,
mx8,
mx177,
mx36,
mx55,
mx216,
mx105,
mx115,
mx130,
mx40,
mx98,
mx43,
mx166,
mx192,
mx162,
mx147,
mx143);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx229 = m.add_instruction(pass_op{}, mx225, mx69, mx192);
m.add_instruction(pass_op{},
mx229,
mx45,
mx59,
mx76,
mx90,
mx218,
mx67,
mx126,
mx103,
mx136,
mx138,
mx15,
mx32,
mx1,
mx160,
mx150,
mx110,
mx51,
mx30,
mx6,
mx157,
mx93,
mx79,
mx85,
mx88,
mx53,
mx154,
mx134,
mx141,
mx180,
mx38,
mx81,
mx223,
mx183,
mx220,
mx210,
mx0,
mx208,
mx20,
mx69,
mx73,
mx185,
mx101,
mx201,
mx22,
mx203,
mx47,
mx128,
mx205,
mx195,
mx8,
mx177,
mx36,
mx55,
mx216,
mx105,
mx115,
mx130,
mx40,
mx98,
mx43,
mx166,
mx192,
mx162,
mx147,
mx143);
m.add_instruction(pass_op{});
auto mx232 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx232,
mx160,
mx154,
mx76,
mx43,
mx67,
mx55,
mx187,
mx88,
mx126,
mx197,
mx225,
mx136,
mx59,
mx64,
mx15,
mx212,
mx128,
mx32,
mx218,
mx150,
mx216,
mx110,
mx169,
mx103,
mx113,
mx141,
mx79,
mx223,
mx90,
mx6,
mx18,
mx138,
mx210,
mx85,
mx53,
mx61,
mx45,
mx134,
mx119,
mx180,
mx166,
mx20,
mx0,
mx177,
mx81,
mx208,
mx157,
mx185,
mx1,
mx69,
mx201,
mx174,
mx101,
mx51,
mx22,
mx162,
mx220,
mx203,
mx47,
mx195,
mx73,
mx27,
mx205,
mx229,
mx8,
mx123,
mx121);
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx236 = m.add_instruction(pass_op{}, mx232, mx192, mx166);
m.add_instruction(pass_op{},
mx236,
mx160,
mx154,
mx76,
mx43,
mx67,
mx55,
mx187,
mx88,
mx126,
mx197,
mx225,
mx136,
mx59,
mx64,
mx15,
mx212,
mx128,
mx32,
mx218,
mx150,
mx216,
mx110,
mx169,
mx103,
mx113,
mx141,
mx79,
mx223,
mx90,
mx6,
mx18,
mx138,
mx210,
mx85,
mx53,
mx61,
mx45,
mx134,
mx119,
mx180,
mx166,
mx20,
mx0,
mx177,
mx81,
mx208,
mx157,
mx185,
mx1,
mx69,
mx201,
mx174,
mx101,
mx51,
mx22,
mx162,
mx220,
mx203,
mx47,
mx195,
mx73,
mx27,
mx205,
mx229,
mx8,
mx123,
mx121);
m.add_instruction(pass_op{});
auto mx239 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{},
mx239,
mx38,
mx192,
mx232,
mx203,
mx229,
mx183,
mx154,
mx201,
mx113,
mx174,
mx110,
mx197,
mx36,
mx115,
mx150,
mx98,
mx130,
mx32,
mx101,
mx169,
mx8,
mx64,
mx27,
mx225,
mx22,
mx147,
mx67,
mx205,
mx73,
mx61,
mx105,
mx18,
mx47,
mx123,
mx93,
mx195,
mx119,
mx69,
mx40,
mx187,
mx30,
mx15,
mx143,
mx236,
mx121,
mx212);
m.add_instruction(pass_op{});
auto mx242 = m.add_instruction(pass_op{}, mx239, mx223);
m.add_instruction(pass_op{},
mx242,
mx38,
mx192,
mx232,
mx203,
mx229,
mx183,
mx154,
mx201,
mx113,
mx174,
mx110,
mx197,
mx36,
mx115,
mx150,
mx98,
mx130,
mx32,
mx101,
mx169,
mx8,
mx64,
mx27,
mx225,
mx22,
mx147,
mx67,
mx205,
mx73,
mx61,
mx105,
mx18,
mx47,
mx123,
mx93,
mx195,
mx119,
mx69,
mx40,
mx187,
mx30,
mx15,
mx143,
mx236,
mx121,
mx212);
auto mx244 = add_alloc(m, migraphx::shape{migraphx::shape::float_type, {2, 5}});
m.add_instruction(pass_op{});
m.add_instruction(pass_op{});
auto mx247 = m.add_instruction(pass_op{}, mx244, mx229, mx242, mx236);
auto moutput =
m.add_parameter("output", migraphx::shape{migraphx::shape::float_type, {3, 1, 2, 5}});
auto mx248 = m.add_instruction(pass_op{}, mx247);
auto mx249 = m.add_instruction(pass_op{}, mx166);
auto mx250 = m.add_instruction(pass_op{}, mx85);
m.add_instruction(pass_op{}, moutput, mx250, mx249, mx248);
run_pass(m);
CHECK(m.get_parameter_shape("scratch").bytes() == 1600);
CHECK(no_allocate(m));
CHECK(is_disjoint({mx0, mx8}));
CHECK(is_disjoint({mx0, mx8}));
CHECK(is_disjoint({mx0, mx18, mx8}));
CHECK(is_disjoint({mx0, mx18, mx8}));
CHECK(is_disjoint({mx0, mx18, mx8}));
CHECK(is_disjoint({mx0, mx18, mx8}));
CHECK(is_disjoint({mx0, mx18, mx8}));
CHECK(is_disjoint({mx0, mx18, mx30, mx8}));
CHECK(is_disjoint({mx0, mx18, mx30, mx8}));
CHECK(is_disjoint({mx30, mx8}));
CHECK(is_disjoint({mx0, mx18, mx30, mx8}));
CHECK(is_disjoint({mx0, mx18, mx38, mx8}));
CHECK(is_disjoint({mx30, mx38}));
CHECK(is_disjoint({mx0, mx18, mx38, mx8}));
CHECK(is_disjoint({mx18, mx30, mx38, mx43, mx8}));
CHECK(is_disjoint({mx0, mx18, mx30, mx38, mx8}));
CHECK(is_disjoint({mx0, mx18, mx30, mx38, mx43, mx8}));
CHECK(is_disjoint({mx0, mx43, mx8}));
CHECK(is_disjoint({mx18, mx30, mx38, mx43, mx8}));
CHECK(is_disjoint({mx18, mx30, mx38, mx53, mx8}));
CHECK(is_disjoint({mx43, mx53}));
CHECK(is_disjoint({mx18, mx30, mx38, mx53, mx8}));
CHECK(is_disjoint({mx38, mx53}));
CHECK(is_disjoint({mx18, mx30, mx38, mx8}));
CHECK(is_disjoint({mx0, mx30, mx38, mx43, mx53, mx61, mx8}));
CHECK(is_disjoint({mx18, mx61}));
CHECK(is_disjoint({mx0, mx30, mx38, mx43, mx53, mx61, mx8}));
CHECK(is_disjoint({mx0, mx18, mx30, mx38, mx43, mx53, mx61, mx67}));
CHECK(is_disjoint({mx0, mx18, mx30, mx38, mx43, mx53, mx61}));
CHECK(is_disjoint({mx18, mx67}));
CHECK(is_disjoint({mx0, mx18, mx30, mx38, mx43, mx53, mx61, mx67}));
CHECK(is_disjoint({mx18, mx30, mx38, mx61, mx67, mx76, mx8}));
CHECK(is_disjoint({mx38, mx76}));
CHECK(is_disjoint({mx18, mx30, mx38, mx61, mx67, mx76, mx8}));
CHECK(is_disjoint({mx18, mx30, mx38, mx61, mx67, mx8, mx81}));
CHECK(is_disjoint({mx61, mx67, mx76, mx81}));
CHECK(is_disjoint({mx18, mx30, mx38, mx61, mx67, mx8, mx81}));
CHECK(is_disjoint({mx18, mx30, mx38, mx61, mx67, mx8, mx88}));
CHECK(is_disjoint({mx81, mx88}));
CHECK(is_disjoint({mx18, mx30, mx38, mx61, mx67, mx8, mx88}));
CHECK(is_disjoint({mx0, mx18, mx38, mx43, mx53, mx61, mx67, mx76, mx8, mx81, mx88, mx93}));
CHECK(is_disjoint({mx0, mx18, mx38, mx43, mx53, mx61, mx67, mx76, mx8, mx81, mx88, mx93}));
CHECK(is_disjoint({mx0, mx101, mx18, mx30, mx38, mx43, mx53, mx61, mx76, mx81, mx88, mx93}));
CHECK(is_disjoint({mx101, mx18, mx30, mx38, mx61, mx67, mx8, mx88, mx93}));
CHECK(
is_disjoint({mx0, mx101, mx18, mx38, mx43, mx53, mx61, mx67, mx76, mx8, mx81, mx88, mx93}));
CHECK(is_disjoint({mx101, mx88, mx93}));
CHECK(is_disjoint({mx0, mx101, mx18, mx30, mx38, mx43, mx53, mx61, mx76, mx81, mx88, mx93}));
CHECK(is_disjoint(
{mx0, mx101, mx113, mx30, mx38, mx43, mx53, mx67, mx76, mx8, mx81, mx88, mx93}));
CHECK(is_disjoint(
{mx0, mx101, mx113, mx18, mx38, mx43, mx53, mx61, mx67, mx76, mx8, mx81, mx88, mx93}));
CHECK(is_disjoint({mx113, mx93}));
CHECK(is_disjoint(
{mx0, mx101, mx113, mx30, mx38, mx43, mx53, mx67, mx76, mx8, mx81, mx88, mx93}));
CHECK(is_disjoint(
{mx0, mx101, mx121, mx30, mx38, mx43, mx53, mx67, mx76, mx8, mx81, mx88, mx93}));
CHECK(is_disjoint({mx113, mx121}));
CHECK(is_disjoint(
{mx0, mx101, mx121, mx30, mx38, mx43, mx53, mx67, mx76, mx8, mx81, mx88, mx93}));
CHECK(is_disjoint({mx101, mx113, mx121, mx126, mx18, mx30, mx38, mx61, mx67, mx8, mx93}));
CHECK(is_disjoint({mx101, mx113, mx121, mx18, mx30, mx38, mx61, mx67, mx8, mx88, mx93}));
CHECK(is_disjoint({mx0,
mx101,
mx113,
mx121,
mx126,
mx18,
mx38,
mx43,
mx53,
mx61,
mx67,
mx76,
mx8,
mx81,
mx88,
mx93}));
CHECK(is_disjoint({mx126, mx88, mx93}));
CHECK(is_disjoint({mx101, mx113, mx121, mx126, mx18, mx30, mx38, mx61, mx67, mx8, mx93}));
CHECK(is_disjoint({mx101, mx113, mx121, mx136, mx18, mx30, mx38, mx61, mx67, mx8, mx93}));
CHECK(is_disjoint({mx126, mx136, mx81}));
CHECK(is_disjoint({mx101, mx113, mx121, mx136, mx18, mx30, mx38, mx61, mx67, mx8, mx93}));
CHECK(is_disjoint({mx121, mx136}));
CHECK(is_disjoint({mx101, mx113, mx121, mx18, mx30, mx38, mx61, mx67, mx8, mx93}));
CHECK(is_disjoint({mx0,
mx101,
mx113,
mx121,
mx126,
mx136,
mx143,
mx18,
mx38,
mx43,
mx53,
mx61,
mx67,
mx76,
mx8,
mx81,
mx88}));
CHECK(is_disjoint({mx101, mx143}));
CHECK(is_disjoint({mx0,
mx101,
mx113,
mx121,
mx126,
mx136,
mx143,
mx18,
mx38,
mx43,
mx53,
mx61,
mx67,
mx76,
mx8,
mx81,
mx88}));
CHECK(is_disjoint({mx0,
mx113,
mx121,
mx126,
mx136,
mx143,
mx150,
mx18,
mx30,
mx38,
mx43,
mx53,
mx61,
mx76,
mx81,
mx88,
mx93}));
CHECK(is_disjoint({mx101, mx150, mx81}));
CHECK(is_disjoint({mx0,
mx113,
mx121,
mx126,
mx136,
mx143,
mx150,
mx18,
mx30,
mx38,
mx43,
mx53,
mx61,
mx76,
mx81,
mx88,
mx93}));
CHECK(is_disjoint(
{mx101, mx113, mx121, mx143, mx150, mx157, mx18, mx30, mx38, mx61, mx67, mx8, mx93}));
CHECK(is_disjoint({mx121, mx157}));
CHECK(is_disjoint(
{mx101, mx113, mx121, mx143, mx150, mx157, mx18, mx30, mx38, mx61, mx67, mx8, mx93}));
CHECK(is_disjoint(
{mx101, mx113, mx121, mx143, mx150, mx162, mx18, mx30, mx38, mx61, mx67, mx8, mx93}));
CHECK(is_disjoint({mx143, mx150, mx157, mx162}));
CHECK(is_disjoint(
{mx101, mx113, mx121, mx143, mx150, mx162, mx18, mx30, mx38, mx61, mx67, mx8, mx93}));
CHECK(is_disjoint({mx0, mx101, mx121, mx126, mx136, mx143, mx150, mx157, mx162, mx169,
mx30, mx38, mx43, mx53, mx67, mx76, mx8, mx81, mx88, mx93}));
CHECK(is_disjoint({mx0, mx101, mx121, mx126, mx136, mx143, mx150, mx157, mx162, mx169,
mx30, mx38, mx43, mx53, mx67, mx76, mx8, mx81, mx88, mx93}));
CHECK(is_disjoint({mx101,
mx113,
mx121,
mx143,
mx150,
mx169,
mx177,
mx18,
mx30,
mx38,
mx61,
mx67,
mx8,
mx93}));
CHECK(is_disjoint({mx162, mx177}));
CHECK(is_disjoint({mx101,
mx113,
mx121,
mx143,
mx150,
mx169,
mx177,
mx18,
mx30,
mx38,
mx61,
mx67,
mx8,
mx93}));
CHECK(is_disjoint({mx0, mx101, mx113, mx121, mx126, mx136, mx150, mx157, mx162, mx169, mx177,
mx18, mx183, mx38, mx43, mx53, mx61, mx67, mx76, mx8, mx81, mx88}));
CHECK(is_disjoint({mx101,
mx113,
mx121,
mx143,
mx150,
mx169,
mx177,
mx18,
mx183,
mx30,
mx38,
mx61,
mx67,
mx8,
mx93}));
CHECK(
is_disjoint({mx0, mx101, mx121, mx126, mx136, mx143, mx150, mx157, mx162, mx169, mx177,
mx183, mx30, mx38, mx43, mx53, mx67, mx76, mx8, mx81, mx88, mx93}));
CHECK(is_disjoint({mx169, mx177, mx183}));
CHECK(is_disjoint({mx0, mx101, mx113, mx121, mx126, mx136, mx150, mx157, mx162, mx169, mx177,
mx18, mx183, mx38, mx43, mx53, mx61, mx67, mx76, mx8, mx81, mx88}));
CHECK(
is_disjoint({mx0, mx113, mx121, mx126, mx136, mx143, mx157, mx162, mx169, mx177, mx18,
mx183, mx195, mx30, mx38, mx43, mx53, mx61, mx76, mx81, mx88, mx93}));
CHECK(is_disjoint({mx0, mx101, mx121, mx126, mx136, mx143, mx150, mx157,
mx162, mx169, mx177, mx183, mx195, mx30, mx38, mx43,
mx53, mx67, mx76, mx8, mx81, mx88, mx93}));
CHECK(is_disjoint({mx169, mx195}));
CHECK(
is_disjoint({mx0, mx113, mx121, mx126, mx136, mx143, mx157, mx162, mx169, mx177, mx18,
mx183, mx195, mx30, mx38, mx43, mx53, mx61, mx76, mx81, mx88, mx93}));
CHECK(
is_disjoint({mx0, mx113, mx121, mx126, mx136, mx143, mx157, mx162, mx169, mx177, mx18,
mx183, mx203, mx30, mx38, mx43, mx53, mx61, mx76, mx81, mx88, mx93}));
CHECK(is_disjoint({mx195, mx203}));
CHECK(
is_disjoint({mx0, mx113, mx121, mx126, mx136, mx143, mx157, mx162, mx169, mx177, mx18,
mx183, mx203, mx30, mx38, mx43, mx53, mx61, mx76, mx81, mx88, mx93}));
CHECK(is_disjoint({mx101,
mx113,
mx121,
mx143,
mx150,
mx169,
mx18,
mx183,
mx195,
mx203,
mx208,
mx30,
mx38,
mx61,
mx67,
mx8,
mx93}));
CHECK(is_disjoint({mx101,
mx113,
mx121,
mx143,
mx150,
mx169,
mx177,
mx18,
mx183,
mx195,
mx203,
mx30,
mx38,
mx61,
mx67,
mx8,
mx93}));
CHECK(is_disjoint({mx0, mx101, mx121, mx126, mx136, mx143, mx150, mx157, mx162,
mx169, mx177, mx183, mx195, mx203, mx208, mx30, mx38, mx43,
mx53, mx67, mx76, mx8, mx81, mx88, mx93}));
CHECK(is_disjoint({mx169, mx177, mx208}));
CHECK(is_disjoint({mx101,
mx113,
mx121,
mx143,
mx150,
mx169,
mx18,
mx183,
mx195,
mx203,
mx208,
mx30,
mx38,
mx61,
mx67,
mx8,
mx93}));
CHECK(is_disjoint({mx101,
mx113,
mx121,
mx143,
mx150,
mx169,
mx18,
mx183,
mx195,
mx203,
mx218,
mx30,
mx38,
mx61,
mx67,
mx8,
mx93}));
CHECK(is_disjoint({mx162, mx208, mx218}));
CHECK(is_disjoint({mx101,
mx113,
mx121,
mx143,
mx150,
mx169,
mx18,
mx183,
mx195,
mx203,
mx218,
mx30,
mx38,
mx61,
mx67,
mx8,
mx93}));
CHECK(is_disjoint({mx203, mx218}));
CHECK(is_disjoint({mx101,
mx113,
mx121,
mx143,
mx150,
mx169,
mx18,
mx183,
mx195,
mx203,
mx30,
mx38,
mx61,
mx67,
mx8,
mx93}));
CHECK(is_disjoint({mx0, mx101, mx121, mx126, mx136, mx143, mx150, mx157, mx162,
mx177, mx183, mx195, mx203, mx208, mx218, mx225, mx30, mx38,
mx43, mx53, mx67, mx76, mx8, mx81, mx88, mx93}));
CHECK(is_disjoint({mx183, mx225}));
CHECK(is_disjoint({mx0, mx101, mx121, mx126, mx136, mx143, mx150, mx157, mx162,
mx177, mx183, mx195, mx203, mx208, mx218, mx225, mx30, mx38,
mx43, mx53, mx67, mx76, mx8, mx81, mx88, mx93}));
CHECK(is_disjoint({mx0, mx101, mx113, mx121, mx126, mx136, mx150, mx157, mx162,
mx169, mx177, mx18, mx195, mx203, mx208, mx218, mx225, mx232,
mx38, mx43, mx53, mx61, mx67, mx76, mx8, mx81, mx88}));
CHECK(is_disjoint({mx162, mx183, mx232}));
CHECK(is_disjoint({mx0, mx101, mx113, mx121, mx126, mx136, mx150, mx157, mx162,
mx169, mx177, mx18, mx195, mx203, mx208, mx218, mx225, mx232,
mx38, mx43, mx53, mx61, mx67, mx76, mx8, mx81, mx88}));
CHECK(is_disjoint({mx101,
mx113,
mx121,
mx143,
mx150,
mx169,
mx18,
mx183,
mx195,
mx203,
mx225,
mx232,
mx239,
mx30,
mx38,
mx61,
mx67,
mx8,
mx93}));
CHECK(is_disjoint({mx203, mx239}));
CHECK(is_disjoint({mx101,
mx113,
mx121,
mx143,
mx150,
mx169,
mx18,
mx183,
mx195,
mx203,
mx225,
mx232,
mx239,
mx30,
mx38,
mx61,
mx67,
mx8,
mx93}));
CHECK(is_disjoint({mx225, mx232, mx239, mx244}));
CHECK(is_disjoint({mx162, mx244, mx81}));
}
TEST_CASE(literal_test) TEST_CASE(literal_test)
{ {
migraphx::program p; migraphx::program p;
......
...@@ -774,6 +774,31 @@ TEST_CASE(inception_resnet) ...@@ -774,6 +774,31 @@ TEST_CASE(inception_resnet)
t.check_conflicts(m, {c1, {i1}}); t.check_conflicts(m, {c1, {i1}});
} }
TEST_CASE(dominate_conflicts)
{
scheduler t{};
migraphx::module m;
auto one = m.add_literal(1);
auto onep1 = m.add_instruction(unary_op{}, one);
auto onep2 = m.add_instruction(unary_op{}, one);
auto binary1 = m.add_instruction(nary_op{}, onep1, onep2);
auto onep3 = m.add_instruction(unary_op{}, binary1);
auto onep4 = m.add_instruction(unary_op{}, binary1);
auto binary2 = m.add_instruction(nary_op{}, onep3, onep4);
t.run_pass(m);
EXPECT(t.get_stream(onep1) != t.get_stream(onep2));
EXPECT(t.get_stream(onep3) != t.get_stream(onep4));
EXPECT(get_wait_for(binary1) ==
get_wait_for(t.get_stream(binary1), {t.get_stream(onep1), t.get_stream(onep2)}));
t.check_conflicts(m, {{onep1}, {onep2}});
t.check_conflicts(m, {{onep3}, {onep4}});
t.check_conflicts(m, {{onep1, onep2}, {onep3, onep4}}, false);
t.check_conflicts(m, {{binary1}, {binary2}}, false);
}
TEST_CASE(inception1) TEST_CASE(inception1)
{ {
scheduler t{}; scheduler t{};
......
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