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

是否支持AVX选项? #195

Open
liuxyon opened this issue Dec 11, 2022 · 6 comments
Open

是否支持AVX选项? #195

liuxyon opened this issue Dec 11, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@liuxyon
Copy link

liuxyon commented Dec 11, 2022

Hy1.3.2 版本添加AVX选项,我们这个脚本安装的是哪个版本?

@emptysuns
Copy link
Owner

目前没有找到很好的判断是否能用AVX指令集的方法
因为有些商家CPU型号支持,cpuinfo看着也有,但是仍是不能用,虚拟化没有开启?

接下来肯定会尽力去支持的,实在不行用很笨的办法“直接下载下来测试”

不过实测下来,也没有因为加了AVX性能有多大提升,所以先鸽一个版本再说

@emptysuns emptysuns added the enhancement New feature or request label Dec 11, 2022
@liuxyon
Copy link
Author

liuxyon commented Dec 11, 2022

群里有人提供这个代码检测,不知道是否可以.

`贡献一个检测脚本

#!/usr/bin/awk -f

BEGIN {
while (!/flags/) if (getline < "/proc/cpuinfo" != 1) exit 1
if (/lm/&&/cmov/&&/cx8/&&/fpu/&&/fxsr/&&/mmx/&&/syscall/&&/sse2/) level = 1
if (level == 1 && /cx16/&&/lahf/&&/popcnt/&&/sse4_1/&&/sse4_2/&&/ssse3/) level = 2
if (level == 2 && /avx/&&/avx2/&&/bmi1/&&/bmi2/&&/f16c/&&/fma/&&/abm/&&/movbe/&&/xsave/) level = 3
if (level == 3 && /avx512f/&&/avx512bw/&&/avx512cd/&&/avx512dq/&&/avx512vl/) level = 4
if (level > 2) { print "Your CPU supports hysteria-avx"; exit level + 1 }
exit 1
}`

@emptysuns
Copy link
Owner

不行,cpuinfo得到信息不准确

@liuxyon
Copy link
Author

liuxyon commented Dec 12, 2022

那能否增加一个选项让自己尝试选择?

@zdfdreamfactory
Copy link

CPU是Intel 3630qm,支持AVX,但是不支持AVX-512,测试了Windows avx版本,无法正常运行。
ARSf7endjS

@emptysuns
Copy link
Owner

CPU是Intel 3630qm,支持AVX,但是不支持AVX-512,测试了Windows avx版本,无法正常运行。 ARSf7endjS

你自己用的客户端无需使用avx因为性能足够
主要瓶颈是廉价的服务端性能不足

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants