Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion core.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import tensorflow.compat.v1 as tf
import collections
import time
import itertools
from typing import Dict, List, Set, Optional, Any as AnyType, Tuple, Union
from .utils.logger import (
logger as logging,
Expand Down Expand Up @@ -582,7 +583,9 @@ def match_once(
if node.name in replaced_node_names:
continue

candidates = self.pattern_index.get(node.op, []) + self.wildcard_patterns
candidates = itertools.chain(
self.pattern_index.get(node.op, []), self.wildcard_patterns
)

found_match = False
for pattern, rewriter in candidates:
Expand Down