target.cpp 1.15 KB
Newer Older
1
2
3
4
5
6
7

#include <migraphx/ref/target.hpp>
#include <migraphx/ref/lowering.hpp>
#include <migraphx/register_target.hpp>
#include <migraphx/pass.hpp>
#include <migraphx/auto_contiguous.hpp>
#include <migraphx/rewrite_rnn.hpp>
kahmed10's avatar
kahmed10 committed
8
9
#include <migraphx/eliminate_pad.hpp>
#include <migraphx/insert_pad.hpp>
10
11
#include <migraphx/dead_code_elimination.hpp>
#include <migraphx/generate.hpp>
Shucai Xiao's avatar
Shucai Xiao committed
12
#include <migraphx/normalize_ops.hpp>
13
14
15
16
17
18
19
20
21

namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
namespace ref {

std::string target::name() const { return "ref"; }

std::vector<pass> target::get_passes(migraphx::context&, const compile_options&) const
{
Shucai Xiao's avatar
Shucai Xiao committed
22
    return {normalize_ops{},
kahmed10's avatar
kahmed10 committed
23
24
25
26
            eliminate_pad{},
            dead_code_elimination{},
            insert_pad{},
            dead_code_elimination{},
Shucai Xiao's avatar
Shucai Xiao committed
27
            rewrite_rnn{},
28
29
30
31
32
33
34
35
36
37
38
39
40
41
            dead_code_elimination{},
            auto_contiguous{},
            dead_code_elimination{},
            lowering{},
            dead_code_elimination{}};
}

argument target::allocate(const shape& s) const { return fill_argument(s, 0); }

MIGRAPHX_REGISTER_TARGET(target);

} // namespace ref
} // namespace MIGRAPHX_INLINE_NS
} // namespace migraphx