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

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

#endif