#pragma once

#include "torch/csrc/jit/ir.h"

namespace torch { namespace jit {


// propagate undefined information through a gradient graph and
// remove grad_of blocks if present.
// Note: this is a very limited pass. It only propagates undefines for
// operations generated by the symbolic autodiff code and cleans up
// AutogradAdds when possible. Outputs of other nodes are conservatively
// marked Unknown and not optimized.
TORCH_API void specializeUndef(Graph & g, const std::vector<bool>& defined);

}}
