Program Listing for File pass_base.h
↰ Return to documentation for file (include/pass_base.h
)
#ifndef MINDSPORE_LITE_INCLUDE_REGISTRY_PASS_BASE_H_
#define MINDSPORE_LITE_INCLUDE_REGISTRY_PASS_BASE_H_
#include <memory>
#include <string>
#include "include/lite_utils.h"
#include "api/ir/func_graph.h"
namespace mindspore {
namespace registry {
class PassBase {
public:
explicit PassBase(const std::string &name = "PassBase") : name_(name) {}
virtual ~PassBase() = default;
virtual bool Execute(const api::FuncGraphPtr &func_graph) = 0;
private:
const std::string name_;
};
using PassBasePtr = std::shared_ptr<PassBase>;
} // namespace registry
} // namespace mindspore
#endif // MINDSPORE_LITE_INCLUDE_REGISTRY_PASS_BASE_H_