blob: ba075c4f6db4000cc0dd145467ab3981ee6c7381 [file] [log] [blame]
#include <torch/csrc/jit/pass_manager.h>
namespace torch {
namespace jit {
std::vector<Pass>& getCustomPostFusionPasses() {
static std::vector<Pass> passes;
return passes;
}
std::vector<Pass>& getCustomPreFusionPasses() {
static std::vector<Pass> passes;
return passes;
}
RegisterPostFusionPass::RegisterPostFusionPass(Pass p) {
getCustomPostFusionPasses().emplace_back(std::move(p));
}
RegisterPreFusionPass::RegisterPreFusionPass(Pass p) {
getCustomPreFusionPasses().emplace_back(std::move(p));
}
} // namespace jit
} // namespace torch