miopen_target.cpp 621 Bytes
Newer Older
Paul's avatar
Paul committed
1
#include <migraph/miopen/miopen_target.hpp>
Paul's avatar
Paul committed
2
#include <migraph/miopen/lowering.hpp>
Paul's avatar
Paul committed
3
4
#include <migraph/miopen/miopen_write_literals.hpp>
#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
10
std::vector<pass> miopen_target::get_passes(context&) const
{
Paul's avatar
Paul committed
11
    return {lowering{}, miopen_write_literals{}};
Paul's avatar
Paul committed
12
}
Paul's avatar
Paul committed
13

Paul's avatar
Paul committed
14
std::string miopen_target::name() const { return "miopen"; }
Paul's avatar
Paul committed
15

Paul's avatar
Paul committed
16
17
context miopen_target::get_context() const
{
18
19
    return miopen_context{share(make_obj<miopen_handle>(&miopenCreate)),
                          share(create_rocblas_handle_ptr())};
Paul's avatar
Paul committed
20
21
}

Paul's avatar
Paul committed
22
23
} // namespace miopen

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