target.cpp 972 Bytes
Newer Older
1
2
3
4
5
6
7
8
9

#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>
#include <migraphx/dead_code_elimination.hpp>
#include <migraphx/generate.hpp>
Shucai Xiao's avatar
Shucai Xiao committed
10
#include <migraphx/normalize_ops.hpp>
11
12
13
14
15
16
17
18
19

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
20
21
    return {normalize_ops{},
            rewrite_rnn{},
22
23
24
25
26
27
28
29
30
31
32
33
34
35
            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