Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only append to cpu string if not initialized #125

Merged
merged 2 commits into from
Aug 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions rwkv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1931,19 +1931,21 @@ bool rwkv_quantize_model_file(const char * in_path, const char * out_path, const
const char * rwkv_get_system_info_string(void) {
static std::string s;

s = "";
s += "AVX=" + std::to_string(ggml_cpu_has_avx()) + " ";
s += "AVX2=" + std::to_string(ggml_cpu_has_avx2()) + " ";
s += "AVX512=" + std::to_string(ggml_cpu_has_avx512()) + " ";
s += "FMA=" + std::to_string(ggml_cpu_has_fma()) + " ";
s += "NEON=" + std::to_string(ggml_cpu_has_neon()) + " ";
s += "ARM_FMA=" + std::to_string(ggml_cpu_has_arm_fma()) + " ";
s += "F16C=" + std::to_string(ggml_cpu_has_f16c()) + " ";
s += "FP16_VA=" + std::to_string(ggml_cpu_has_fp16_va()) + " ";
s += "WASM_SIMD=" + std::to_string(ggml_cpu_has_wasm_simd()) + " ";
s += "BLAS=" + std::to_string(ggml_cpu_has_blas()) + " ";
s += "SSE3=" + std::to_string(ggml_cpu_has_sse3()) + " ";
s += "VSX=" + std::to_string(ggml_cpu_has_vsx());
if (s.empty()) {
s = "";
s += "AVX=" + std::to_string(ggml_cpu_has_avx()) + " ";
s += "AVX2=" + std::to_string(ggml_cpu_has_avx2()) + " ";
s += "AVX512=" + std::to_string(ggml_cpu_has_avx512()) + " ";
s += "FMA=" + std::to_string(ggml_cpu_has_fma()) + " ";
s += "NEON=" + std::to_string(ggml_cpu_has_neon()) + " ";
s += "ARM_FMA=" + std::to_string(ggml_cpu_has_arm_fma()) + " ";
s += "F16C=" + std::to_string(ggml_cpu_has_f16c()) + " ";
s += "FP16_VA=" + std::to_string(ggml_cpu_has_fp16_va()) + " ";
s += "WASM_SIMD=" + std::to_string(ggml_cpu_has_wasm_simd()) + " ";
s += "BLAS=" + std::to_string(ggml_cpu_has_blas()) + " ";
s += "SSE3=" + std::to_string(ggml_cpu_has_sse3()) + " ";
s += "VSX=" + std::to_string(ggml_cpu_has_vsx());
}

return s.c_str();
}