Alexey-Yazev commented on code in PR #13645:
URL: https://github.com/apache/tvm/pull/13645#discussion_r1067796699
##########
tests/python/contrib/test_ethosu/test_codegen.py:
##########
@@ -1109,6 +1109,77 @@ def leaky_relu_func(x):
)
+# conv2d + relu_n1_to_1 is used because separate activation is not offloaded
to NPU.
+def test_tflite_relu_n1_to_1():
+ np.random.seed(0)
+ accel_type = "ethos-u55-256"
+ ifm_shape = (1, 55, 34, 3)
+ kernel_shape = (3, 2)
+ strides = (1, 1)
+ padding = (1, 0, 1, 1)
+
+ @tf.function
+ def conv2d_relu_n1_to_1(x):
+ tf_strides = [1, strides[0], strides[1], 1]
+ op = tf.pad(
+ x,
+ [[0, 0], [padding[0], padding[2]], [padding[1], padding[3]], [0,
0]],
+ "CONSTANT",
+ )
Review Comment:
There is no specific reason, it can be removed.
--
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]