suppress onnx optimizer warning (#1593)

pull/1670/head
q.yao 2023-01-20 00:25:50 +08:00 committed by GitHub
parent 7e48fb2905
commit 8a050f10dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 1 additions and 17 deletions

View File

@ -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;
};

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;