alanmacd commented on code in PR #12063:
URL: https://github.com/apache/tvm/pull/12063#discussion_r923797786
##########
tests/python/unittest/test_node_reflection.py:
##########
@@ -70,35 +74,40 @@ def test_make_smap():
def test_make_node():
+ """Test make node"""
+ # pylint: disable=invalid-name
x = tvm.ir.make_node("IntImm", dtype="int32", value=10, span=None)
assert isinstance(x, tvm.tir.IntImm)
assert x.value == 10
- A = te.placeholder((10,), name="A")
- AA = tvm.ir.make_node(
- "Tensor", shape=A.shape, dtype=A.dtype, op=A.op,
value_index=A.value_index
+ a = te.placeholder((10,), name="a")
+ aa = tvm.ir.make_node(
+ "Tensor", shape=a.shape, dtype=a.dtype, op=a.op,
value_index=a.value_index
)
- assert AA.op == A.op
- assert AA.value_index == A.value_index
+ assert aa.op == a.op
+ assert aa.value_index == a.value_index
- y = tvm.ir.make_node("IntImm", dtype=tvm.runtime.String("int32"),
value=10, span=None)
+ tvm.ir.make_node("IntImm", dtype=tvm.runtime.String("int32"), value=10,
span=None)
def test_make_sum():
- A = te.placeholder((2, 10), name="A")
+ # pylint: disable=invalid-name
+ a = te.placeholder((2, 10), name="a")
k = te.reduce_axis((0, 10), "k")
- B = te.compute((2,), lambda i: te.sum(A[i, k], axis=k), name="B")
- json_str = tvm.ir.save_json(B)
- BB = tvm.ir.load_json(json_str)
- assert B.op.body[0].combiner is not None
- assert BB.op.body[0].combiner is not None
+ b = te.compute((2,), lambda i: te.sum(a[i, k], axis=k), name="b")
+ json_str = tvm.ir.save_json(b)
+ bb = tvm.ir.load_json(json_str)
+ assert b.op.body[0].combiner is not None
+ assert bb.op.body[0].combiner is not None
def test_env_func():
+ """Test environment function"""
+
@tvm.register_func("test.env_func")
- def test(x):
+ def test(x): # pylint: disable=unused-variable
Review Comment:
test() is seen as "unused"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]