Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
crazydemo committed Jun 22, 2022
1 parent 178138f commit 5f484ac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 1 addition & 5 deletions python/tvm/relay/op/contrib/dnnl.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,6 @@ class ResNetV1Rewrite(DFPatternCallback):

def __init__(self):
super(ResNetV1Rewrite, self).__init__()
self.cnt = 0
self.attr_lst = []
self.data = wildcard()
self.w1, self.b1 = wildcard(), wildcard()
Expand Down Expand Up @@ -899,7 +898,6 @@ def visit_func(expr):
_analysis.post_order_visit(pre, visit_func)

def callback(self, pre, post, node_map):
# print(pre)
self.get_attr(pre)
data = node_map[self.data][0]
w1, b1 = node_map[self.w1][0], node_map[self.b1][0]
Expand Down Expand Up @@ -954,9 +952,7 @@ def callback(self, pre, post, node_map):
return out

def rewrite_resnetv1(mod):
"""Rewrite the input graph to reorder reshape operators so that
we can perform dense_bias_gelu/dense_bias fusion and then offload
them to byoc part.
"""Rewrite the the ResNetV1 downsize block to reduce the computation complexity.
"""
mod["main"] = rewrite(ResNetV1Rewrite(), mod["main"]
)
Expand Down
1 change: 0 additions & 1 deletion tests/python/contrib/test_dnnl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,6 @@ def get_graph():
run_and_verify_func(config, run_module=run_module, dtype=dtype)


>>>>>>> 1c53452ca... rewrite downsize blocks for rensetv1 to get better performance
def permute_shape(shape, l_from="", l_to=""):
res_shape = []
for label in l_to:
Expand Down

0 comments on commit 5f484ac

Please sign in to comment.