54cd235d7d0c01c05d29f4f26fd8788a50b84877,tests/python/relay/test_any.py,,verify_any_argwhere,#Any#Any#Any#,215
Before Change
mod["main"] = relay.Function([x], y)
data = np.random.choice([0, 1, 2, 3], size=x_np_shape).astype(dtype)
expected = np.argwhere(data)
for kind in ["debug", "vm"]:
ex = relay.create_executor(kind, mod=mod, ctx=tvm.cpu(), target="llvm")
result = ex.evaluate()(data).asnumpy()
assert result.shape == expected.shape
tvm.testing.assert_allclose(result.flatten(), expected.flatten())
// TODO(@zhiics) argwhere gpu schedule is currently not avaiable
// check_result([data], mod, expected, flatten=True)
@tvm.testing.uses_gpu
def test_any_argwhere():
verify_any_argwhere(any_dims(1), (5,))
verify_any_argwhere(any_dims(2), (5, 5))
After Change
mod["main"] = relay.Function([x], y)
data = np.random.choice([0, 1, 2, 3], size=x_np_shape).astype(dtype)
expected = np.argwhere(data)
check_result([data], mod, expected, flatten=True)
// TODO(zhiics) Enable argwhere gpu test after sort is fixed. Otherwise, we have
// to use thrust to guarantee the correct results which has been tested locally.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 12
Instances Project Name: apache/incubator-tvm
Commit Name: 54cd235d7d0c01c05d29f4f26fd8788a50b84877
Time: 2020-12-04
Author: 5145158+zhiics@users.noreply.github.com
File Name: tests/python/relay/test_any.py
Class Name:
Method Name: verify_any_argwhere
Project Name: apache/incubator-tvm
Commit Name: 1224d56ca95825b4244d337df4cd04546108c9cd
Time: 2020-09-03
Author: 5145158+zhiics@users.noreply.github.com
File Name: tests/python/relay/test_any.py
Class Name:
Method Name: verify_any_full
Project Name: apache/incubator-tvm
Commit Name: 1224d56ca95825b4244d337df4cd04546108c9cd
Time: 2020-09-03
Author: 5145158+zhiics@users.noreply.github.com
File Name: tests/python/relay/test_any.py
Class Name:
Method Name: verify_any_full_like
Project Name: apache/incubator-tvm
Commit Name: 54cd235d7d0c01c05d29f4f26fd8788a50b84877
Time: 2020-12-04
Author: 5145158+zhiics@users.noreply.github.com
File Name: tests/python/relay/test_any.py
Class Name:
Method Name: verify_any_argwhere