fzi-peccia commented on code in PR #18182:
URL: https://github.com/apache/tvm/pull/18182#discussion_r2290864898
##########
python/tvm/meta_schedule/tune_context.py:
##########
@@ -117,6 +118,13 @@ def __init__(
if target is not None:
if not isinstance(target, Target):
target = Target(target)
+ if "riscv_cpu" in target.keys:
+ if target_has_features("v", target):
+ # Because the RVV intrinsics depend on the target, we
register them here
+ # pylint: disable=import-outside-toplevel
+ from tvm.tir.tensor_intrin.riscv_cpu import
register_riscv_tensor_intrinsics
+
+ register_riscv_tensor_intrinsics(target)
Review Comment:
This is for MetaSchedule, to be able to register the correct intrinsics
based on the target. If I add the initialization in riscv_cpu.py like the other
ones do it, I don't have the information of the target yet.
--
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]