-
Notifications
You must be signed in to change notification settings - Fork 3.2k
in cmake/CMakeList.txt all avx related option all set off, do we need do anything to use avx features? #11833
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
Comments
@chenfucn Mind taking a look? |
For the heaviest operators, like MatMul, Conv and etc., ORT automatically selects to run the code that fit the arch best. |
Can this be understood that for CPUs that support the AVX instruction set, OnnxRuntime will use AVX acceleration by default? |
Yes |
I turned the avx, avx2, avx512 off, then compile the onnxruntime.But I find there are still avx instructions.Why? |
@chenfucn is it so that onnxruntime should be compiled specifically for AVX2 etc to benefit from them or simple |
Is onnxruntime using avx512 by default? If yes how to confirm this? like oprnvino has benchmark that shows which instruction set is being used for dfifferent layers/ops, is there something similar for onnxruntime? Also how to make sure onnxruntime doesn't use avx512 or use avx2? |
#11833 (comment) hi @jywu-msft would you help with future mlas questions as I moved my focus to other areas? Thanks! |
So I tested a quantised model on an E2 instance which doesn't support avx512 vs N1 instance that has avx512 support. The scores for the model changes a lot. I don't want to move to E2 instance as I do development in N1 but deployment on E2, so is there a way for mlas to not use avx512 on supported cpu? and I still couldn't find a way to know which kernels it used (as done in openvino benchmark) |
in cmake/CMakeList.txt all avx related option are set OFF as follow, and can't find any place to set to ON, do we need to care about these options? in my product env have very different machine types, which have different cpu arch, is onnxruntime auto select right avx type to use for acc?

i add a message command at the end of CMakeFile.txt to display CMAKE_CXX_FLAGS and only output "-ffunction-sections -fdata-sections -Wno-error=attributes -DCPUINFO_SUPPORTED" , which do'nt has any infomation about avx arch
The text was updated successfully, but these errors were encountered: