Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[testing][py_converter] Enhance py_converter to better support entire modules #13769

Merged
merged 8 commits into from
Feb 15, 2023
Prev Previous commit
Next Next commit
[py_converter] Use numpy instead of asnumpy (deprecated)
slyubomirsky committed Jan 23, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit ecb98dfd16912545cfe828aad07ad692b557804e
2 changes: 1 addition & 1 deletion python/tvm/relay/testing/py_converter.py
Original file line number Diff line number Diff line change
@@ -510,7 +510,7 @@ def visit_if(self, if_block: Expr):

# need to get the value out of a NDArray to check the condition
# equvialent to: val.numpy()
cond_check = ast.Call(ast.Attribute(cond_body, "asnumpy", Load()), [], [])
cond_check = ast.Call(ast.Attribute(cond_body, "numpy", Load()), [], [])
ret = ast.IfExp(cond_check, true_body, false_body)
return (ret, cond_defs + true_defs + false_defs)