From a7127f2c58f12e613beccf8b3bdf3b017f0e0b52 Mon Sep 17 00:00:00 2001 From: nihui Date: Sun, 22 Dec 2024 22:03:39 +0800 Subject: [PATCH] always prefer xtheadvector --- src/layer.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/layer.cpp b/src/layer.cpp index d82595105ce..15695028875 100644 --- a/src/layer.cpp +++ b/src/layer.cpp @@ -546,13 +546,6 @@ Layer* create_layer_cpu(int index) } else #endif // NCNN_RUNTIME_CPU && NCNN_MSA -#if NCNN_RUNTIME_CPU && NCNN_RVV - if (ncnn::cpu_support_riscv_v()) - { - layer_creator = layer_registry_rvv[index].creator; - } - else -#endif // NCNN_RUNTIME_CPU && NCNN_RVV #if NCNN_RUNTIME_CPU && NCNN_XTHEADVECTOR if (ncnn::cpu_support_riscv_xtheadvector()) { @@ -560,6 +553,13 @@ Layer* create_layer_cpu(int index) } else #endif // NCNN_RUNTIME_CPU && NCNN_XTHEADVECTOR +#if NCNN_RUNTIME_CPU && NCNN_RVV + if (ncnn::cpu_support_riscv_v()) + { + layer_creator = layer_registry_rvv[index].creator; + } + else +#endif // NCNN_RUNTIME_CPU && NCNN_RVV { layer_creator = layer_registry_arch[index].creator; }