tkonolige commented on code in PR #13423:
URL: https://github.com/apache/tvm/pull/13423#discussion_r1025848318
##########
python/tvm/relay/op/strategy/x86.py:
##########
@@ -507,10 +507,26 @@ def matmul_strategy_cpu(attrs, inputs, out_type, target):
return strategy
+def is_any(shape):
+ return any([isinstance(x, tir.Any) or isinstance(x, tir.SizeVar) for x in
shape])
+
+
@dense_strategy.register("cpu")
def dense_strategy_cpu(attrs, inputs, out_type, target):
"""dense x86 strategy"""
+
strategy = _op.OpStrategy()
+ # For dynamic shapes we use a hand written kernel. Right now it only
+ # supports matrix-vector multiplication.
+ if is_any(inputs[0].shape) or is_any(inputs[1].shape):
Review Comment:
Added a check in the implementation.
##########
python/tvm/relay/op/strategy/x86.py:
##########
@@ -507,10 +507,26 @@ def matmul_strategy_cpu(attrs, inputs, out_type, target):
return strategy
+def is_any(shape):
Review Comment:
renamed to `is_dynamic_shape`
--
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]