Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

edgify / torch   python

Repository URL to install this package:

Version: 2.0.1+cpu 

/ include / torch / csrc / jit / passes / eliminate_no_ops.h

#pragma once

#include <torch/csrc/jit/ir/ir.h>

namespace torch {
namespace jit {

// Remove ops that do nothing on the forward pass (like aten::detach).
// This pass is invoked as a part of freeze_module.
// This function also takes a set of custom ops to eliminate. All ops in this
// set must take their output as their first input, i.e. x = f(x, ...)
TORCH_API bool EliminateNoOps(
    std::shared_ptr<Graph>& graph,
    std::unordered_set<c10::Symbol> custom_ops = {});

} // namespace jit
} // namespace torch