Files
pytorch/torch/csrc/jit/node_hashing.h
Elias Ellison 00aedfc0e2 constant pooling pass (#12222)
Summary:
Add a pass to move all constants to the beginning of the graph, and deduplicate.

This extends https://github.com/pytorch/pytorch/pull/10231 to also handle constants introduced in inlining, constant propagation, etc.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/12222

Reviewed By: driazati

Differential Revision: D10201616

Pulled By: eellison

fbshipit-source-id: bc9c5be26868c8b5414257a0d4462de025aeb9bd
2018-10-08 11:55:02 -07:00

16 lines
230 B
C++

#pragma once
#include "torch/csrc/jit/ir.h"
namespace torch { namespace jit {
struct HashNode {
size_t operator()(const Node* k) const;
};
struct EqualNode {
bool operator()(const Node* lhs, const Node* rhs) const;
};
}}