Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
d-smirnov committed Oct 28, 2020
1 parent 464ce8b commit 5d62080
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions python/tvm/relay/op/contrib/arm_compute_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def global_avg_pool2d(expr):
@tvm.ir.register_op_attr("maximum", "target.arm_compute_lib")
def maximum(expr):
"""Check if the external ACL codegen for maximum should be used."""
attrs, args = expr.attrs, expr.args
args = expr.args
type_a = args[0].checked_type
type_b = args[0].checked_type
return (type_a.dtype == "float32") and (type_b.dtype == "float32")
Expand All @@ -357,7 +357,7 @@ def maximum(expr):
@tvm.ir.register_op_attr("add", "target.arm_compute_lib")
def add(expr):
"""Check if the external ACL codegen for add should be used."""
attrs, args = expr.attrs, expr.args
args = expr.args
for typ in [args[0].checked_type, args[1].checked_type]:
if typ.dtype != "float32":
return False
Expand All @@ -368,7 +368,7 @@ def add(expr):
@tvm.ir.register_op_attr("qnn.add", "target.arm_compute_lib")
def qnn_add(expr):
"""Check if the external ACL codegen for add should be used."""
attrs, args = expr.attrs, expr.args
args = expr.args
for typ in [args[0].checked_type, args[1].checked_type]:
if typ.dtype != "uint8":
return False
Expand Down
6 changes: 3 additions & 3 deletions python/tvm/relay/op/contrib/tensorrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def _register_external_op_helper(op_name, supported=True):
def add_annotate_fn(expr): # pylint: disable=unused-variable
"""Check if add is supported by TensorRT."""

attrs, args = expr.attrs, expr.args
args = expr.args
if any([x.checked_type.dtype != "float32" for x in args]):
logger.info("Only float32 inputs are supported for TensorRT.")
return False
Expand Down Expand Up @@ -264,7 +264,7 @@ def conv2d_annotate_fn(expr): # pylint: disable=unused-variable
def dense_annotate_fn(expr): # pylint: disable=unused-variable
"""Check if dense is supported by TensorRT."""

attrs, args = expr.attrs, expr.args
args = expr.args
if any([x.checked_type.dtype != "float32" for x in args]):
logger.info("Only float32 inputs are supported for TensorRT.")
return False
Expand All @@ -283,7 +283,7 @@ def dense_annotate_fn(expr): # pylint: disable=unused-variable
def bias_add_annotate_fn(expr): # pylint: disable=unused-variable
"""Check if nn.bias_add is supported by TensorRT."""

attrs, args = expr.attrs, expr.args
args = expr.args
if any([x.checked_type.dtype != "float32" for x in args]):
logger.info("Only float32 inputs are supported for TensorRT.")
return False
Expand Down

0 comments on commit 5d62080

Please sign in to comment.