From ce67775f088307bbeac7dd36982334fcf5a7775c Mon Sep 17 00:00:00 2001 From: Michael Suo Date: Fri, 5 Apr 2019 15:13:35 -0700 Subject: [PATCH] remove unused func (#18712) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/18712 ghimport-source-id: e435150a501b20695a5276addee93d795e04b532 Stack from [ghstack](https://github.com/ezyang/ghstack): * **#18712 [jit][easy] remove unused func** * #18711 [jit] fix side-effects and aliasing for custom ops as title Differential Revision: D14730979 fbshipit-source-id: 381d16ea2a45779bf6d5fc6d90a4f8585461e902 --- torch/csrc/jit/graph_executor.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/torch/csrc/jit/graph_executor.cpp b/torch/csrc/jit/graph_executor.cpp index 4d3f848..da088a8 100644 --- a/torch/csrc/jit/graph_executor.cpp +++ b/torch/csrc/jit/graph_executor.cpp @@ -322,18 +322,6 @@ struct GraphExecutorImpl { return copy; } - inline bool hasMutableOperators(Block* block) { - for (auto n : block->nodes()) { - if (n->kind().is_aten() && n->schema().is_mutable()) - return true; - for (auto b : n->blocks()) { - if (hasMutableOperators(b)) - return true; - } - } - return false; - } - GraphExecutorImpl(std::shared_ptr graph, bool optimize) : graph(prepareGraph(graph)), // until we have correct alias analysis any use of mutable operators -- 2.7.4