target.cpp 575 Bytes
Newer Older
Paul's avatar
Paul committed
1
#include <migraph/miopen/target.hpp>
Paul's avatar
Paul committed
2
#include <migraph/miopen/lowering.hpp>
Paul's avatar
Paul committed
3
#include <migraph/miopen/write_literals.hpp>
Paul's avatar
Paul committed
4
#include <migraph/miopen/context.hpp>
Paul's avatar
Paul committed
5
6

namespace migraph {
Paul's avatar
Paul committed
7
namespace miopen {
Paul's avatar
Paul committed
8

Paul's avatar
Paul committed
9
std::vector<pass> target::get_passes(context&) const { return {lowering{}, write_literals{}}; }
Paul's avatar
Paul committed
10

Paul's avatar
Paul committed
11
std::string target::name() const { return "miopen"; }
Paul's avatar
Paul committed
12

Paul's avatar
Paul committed
13
context target::get_context() const
Paul's avatar
Paul committed
14
{
15
16
    return miopen_context{share(make_obj<miopen_handle>(&miopenCreate)),
                          share(create_rocblas_handle_ptr())};
Paul's avatar
Paul committed
17
18
}

Paul's avatar
Paul committed
19
20
} // namespace miopen

Paul's avatar
Paul committed
21
} // namespace migraph