eliminate_allocation.hpp 655 Bytes
Newer Older
1
2
3
4
5
#ifndef MIGRAPH_GUARD_RTGLIB_ELIMINATE_ALLOCATION_HPP
#define MIGRAPH_GUARD_RTGLIB_ELIMINATE_ALLOCATION_HPP

#include <string>
#include <migraph/instruction_ref.hpp>
6
7
#include <migraph/config.hpp>

8
9
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
10
11
12

struct program;

Paul's avatar
Paul committed
13
/**
Paul's avatar
Paul committed
14
15
 * Remove memory allocations. This will create a parameter which is the max of all memory used in
 * the program.
Paul's avatar
Paul committed
16
 */
17
18
struct eliminate_allocation
{
Paul's avatar
Paul committed
19
20
    std::string allocation_op{};
    std::size_t alignment = 32;
21
22
23
    std::string name() const { return "eliminate_allocation"; }
    void apply(program& p) const;
};
24

25
} // namespace MIGRAPH_INLINE_NS
26
27
28
} // namespace migraph

#endif