-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[ETHOSN] Apply FoldConstant before NPU partitioning #13848
Conversation
Introduced FoldConstant before NPU partitioning. Added a qnn.add test where both inputs are constants. Updated the number of operators remaining in the host code for ssd_mobilenet_v1 as the FoldConstant reduces the number of operators. Change-Id: I618c4a1b207b398106f6842322102cf94276e524
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment. Generated by tvm-bot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ashutosh-arm LGTM!
@@ -218,6 +218,6 @@ def test_ssd_mobilenet_v1(): | |||
input_dict={"normalized_input_image_tensor": (1, 300, 300, 3)}, | |||
compile_hash=_compile_hash, | |||
output_count=4, | |||
host_ops=26, | |||
host_ops=14, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😱
else: | ||
a = relay.var("a", shape=lhs_shape, dtype=dtype) | ||
|
||
if rhs_is_constant: | ||
b_data = np.array(constant_data, dtype=dtype).reshape(rhs_shape) | ||
np.random.randint(data_min, data_max + 1, size=rhs_shape, dtype=dtype) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this - looks much better!
Thanks @ashutosh-arm! |
Introduced FoldConstant before NPU partitioning. Added a qnn.add test where both inputs are constants. Updated the number of operators remaining in the host code for ssd_mobilenet_v1 as the FoldConstant reduces the number of operators.
Introduced FoldConstant before NPU partitioning. Added a qnn.add test where both inputs are constants. Updated the number of operators remaining in the host code for ssd_mobilenet_v1 as the FoldConstant reduces the number of operators.
cc @lhutton1