1#pragma once
2
3#include <ATen/ATen.h>
4#include <ATen/core/ivalue.h>
5#include <ATen/core/jit_type.h>
6#include <torch/csrc/Export.h>
7#include <torch/csrc/jit/ir/ir.h>
8
9namespace torch {
10namespace jit {
11
12// Undefinedness makes argument matching fail for regular tensor operations
13// if 1+ arguments are undefined or possibly undefined tensors.
14// Technically, undefined tensors are **not** tensors as the regular tensor
15// operations do not know how to handle them.
16// However, in practice, there are guards and conversion operators that
17// **always** gate regular operations if undefined tensors may be present
18// Eventually, we would love to move to the world where we use optionals
19// in lieu of undefined tensors.
20// When this happens, this pass will be removed
21TORCH_API void ClearUndefinedness(const std::shared_ptr<Graph>& graph);
22
23} // namespace jit
24} // namespace torch
25