Anndrey24 commented on code in PR #16106:
URL: https://github.com/apache/tvm/pull/16106#discussion_r1391265708
##########
python/tvm/relay/op/strategy/arm_cpu.py:
##########
@@ -242,7 +242,13 @@ def conv2d_strategy_arm_cpu(attrs, inputs, out_type,
target):
),
name="conv2d_NHWC_quantized_interleaved.arm_cpu",
)
- if (not is_aarch64) or (data.dtype not in ["int8", "uint8"]):
+ if is_aarch64 and data.dtype not in ["int8", "uint8"]:
+ strategy.add_implementation(
+
wrap_compute_conv2d(topi.arm_cpu.compute_conv2d_NHWC_fp32_hybrid),
+
wrap_topi_schedule(topi.arm_cpu.schedule_conv2d_NHWC_fp32_hybrid),
+ name="conv2d_NHWC_fp32_hybrid.arm_cpu",
+ )
+ else:
Review Comment:
It is mostly an oversight on my part, since under these two conditions
`conv2d_NHWC_quantized_interleaved.arm_cpu` would have already been added to
the strategy first and I only considered the cases where
`conv2d_nhwc_spatial_pack.arm_cpu` was the only viable, and thus selected,
strategy:
- `is_aarch64=False` and `data.dtype not in ["int8", "uint8"]`
- `is_aarch64=False` and `data.dtype in ["int8", "uint8"]`
While I think the selected implementation is still correct in the end, as
this test case still passes:
https://github.com/apache/tvm/blob/f719151486c452d0c5c44339c3578bf64711ef29/tests/python/relay/strategy/test_select_implementation.py#L73-L74,
I do agree that the strategy selection is overly convoluted now, so I will
move the conditions around a bit to try and fix that.
--
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]