ekalda commented on code in PR #17007:
URL: https://github.com/apache/tvm/pull/17007#discussion_r1606784826
##########
tests/python/topi/test_topi_conv2d_nhwc.py:
##########
@@ -104,14 +104,36 @@ def ref_data(dtype, batch, in_channel, in_size,
num_filter, kernel, stride, padd
a_shape = (batch, in_height, in_width, in_channel)
w_shape = (kernel, kernel, in_channel, num_filter)
+ np.random.seed(0)
a_np = np.random.uniform(size=a_shape).astype(dtype)
w_np = np.random.uniform(size=w_shape).astype(dtype)
dw_np = tvm.topi.testing.dilate_python(w_np, (dilation, dilation, 1, 1))
- b_np = tvm.topi.testing.conv2d_nhwc_python(a_np, dw_np, stride, padding)
+
+ # scipy.signal.convolve2d does not support float16 data types,
+ # and the python fallback would be too slow for general use.
+ conv_dtype = "float32" if dtype == "float16" else dtype
Review Comment:
Doesn't this always resolve to "float32"?
--
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]