suppress onnx optimizer warning (#1593)
parent
7e48fb2905
commit
8a050f10dc
|
@ -61,8 +61,8 @@ class SubgraphMatcher::SubgraphMatcherImpl {
|
|||
std::unordered_map<const Node*, Node*> nodes_map_;
|
||||
std::unordered_map<const Value*, Value*> values_map_;
|
||||
|
||||
const MatchAttribute match_attribute_;
|
||||
const Graph& pattern_;
|
||||
const MatchAttribute match_attribute_;
|
||||
const Node* anchor_ = nullptr;
|
||||
};
|
||||
|
||||
|
|
|
@ -14,18 +14,6 @@ using torch::jit::HashNode;
|
|||
using torch::jit::Node;
|
||||
using torch::jit::Value;
|
||||
|
||||
struct EqualNodeWithParams {
|
||||
EqualNodeWithParams(std::unordered_map<std::string, Tensor>& params) : params_(params) {}
|
||||
|
||||
bool operator()(const Node* lhs, const Node* rhs) const {
|
||||
auto lhs_inputs = lhs->inputs();
|
||||
auto rhs_inputs = rhs->inputs();
|
||||
}
|
||||
|
||||
private:
|
||||
std::unordered_map<std::string, Tensor>& params_;
|
||||
};
|
||||
|
||||
struct CommonSubexpressionEliminator {
|
||||
using ParamMapType = std::unordered_map<std::string, std::pair<Tensor, Value*>>;
|
||||
CommonSubexpressionEliminator(std::shared_ptr<Graph> graph,
|
||||
|
@ -100,7 +88,6 @@ struct CommonSubexpressionEliminator {
|
|||
|
||||
// Check for CSE opportunities in the parent block.
|
||||
auto parent_lookup = parent_lookup_fn(node);
|
||||
auto g_out = node->owningGraph()->outputs();
|
||||
if (parent_lookup != nullptr) {
|
||||
changed = true;
|
||||
node->replaceAllUsesWith(parent_lookup);
|
||||
|
|
|
@ -108,7 +108,6 @@ bool FuseSelectAssign(Node* node, std::unordered_map<std::string, Tensor>& param
|
|||
|
||||
void FuseSelectAssign(Block* block, std::unordered_map<std::string, Tensor>& params,
|
||||
std::unordered_map<std::string, Value*>& vmap, SubgraphMatcher& matcher) {
|
||||
auto graph = block->owningGraph();
|
||||
auto it = block->nodes().begin();
|
||||
while (it != block->nodes().end()) {
|
||||
auto node = *it;
|
||||
|
|
|
@ -92,7 +92,6 @@ void MergeShapeConcate(Node* node) {
|
|||
}
|
||||
|
||||
void MergeShapeConcate(Block* block) {
|
||||
auto graph = block->owningGraph();
|
||||
auto it = block->nodes().begin();
|
||||
while (it != block->nodes().end()) {
|
||||
auto node = *it;
|
||||
|
|
|
@ -53,7 +53,6 @@ void RemoveRedundantCast(Node* node) {
|
|||
}
|
||||
|
||||
void ONNXPeephole(Block* block) {
|
||||
auto graph = block->owningGraph();
|
||||
auto it = block->nodes().begin();
|
||||
while (it != block->nodes().end()) {
|
||||
auto node = *it;
|
||||
|
|
Loading…
Reference in New Issue