What about using sse3 or SSE4_2 ? Every new intel, and AMD CPU has it.
Two questions.
1) If a CPU doesn't have those does the task fail soft or die with a computation error?
2) What software development brings the most benefit to the project? And the related question what software can enjoy the widest use by volunteers?
All that said, the anonymous platform allows individuals, teams and groups to write code to solve the same task as the baseline programs, that may run faster or use less resources.
I am aware of such efforts and use them.
1) It will die with an error, but only on CPU, which do not have those extentions. Most new CPU have those.
2) I do not understand your questions. Here are many user without gpu, who would benefit from any new code.
Application code can be agnostic for utilizing whatever SIMD instructions the cpu and OS support. An example is the Asteroids@home cpu binary which is called a "universal" binary. All SIMD instructions from SSE to AVX-512 supported.
Something like that app binary needs to be put in place here for the cpu applications.
Application code can be agnostic for utilizing whatever SIMD instructions the cpu and OS support. An example is the Asteroids@home cpu binary which is called a "universal" binary. All SIMD instructions from SSE to AVX-512 supported.
Something like that app binary needs to be put in place here for the cpu applications.
AND I wish it would be automatic to use it if a users CPU does not support the latest instructions. And with check box on the Projects/Preferences page I wish it would be automatic to use it if a users CPU does not support the latest instructions. The check box would have a short explanation saying that it could take a bit longer than if their CPU had AVX-512. ie if a user has the box checked on the Projects/Preferences page than the app will chose the best version for the cpu not just the latest one that could return errors.
The asteroids app uses the highest level SIMD instruction the cpu supports. Always.
You would have to revert to explicit single level SIMD capable binaries with a very long list of each SIMD instruction level.
OR provide a app_config toggle to exclude AVX-512 instructions for example if a user decides to NOT use the AVX-512 capability of the universal app and only use the next highest level of AVX2 for example.
The asteroids app you can pass a command line argument in app_config to select which instruction you want to use if you don’t want it to use the “best” one via its own detection.
The asteroids app you can pass a command line argument in app_config to select which instruction you want to use if you don’t want it to use the “best” one via its own detection.
Which command line should I use to get the app to use AVX instead of FMA?
AND I wish it would be automatic to use it if a users CPU does not support the latest instructions. And with check box on the Projects/Preferences page I wish it would be automatic to use it if a users CPU does not support the latest instructions. The check box would have a short explanation saying that it could take a bit longer than if their CPU had AVX-512. ie if a user has the box checked on the Projects/Preferences page than the app will chose the best version for the cpu not just the latest one that could return errors.
The app should only use instruction sets supported by your CPU. It detects your CPU's capabilities, and if you attempt to run, for example, AVX-512 code on a CPU that doesn't support it, the app will crash due to an illegal instruction.
the latest one that could return errors
what do you mean? If the app crashes, it could be due to a bug, hardware failure, or overheating.
choosing a worse instruction set isn't something a regular user should do. There are a few exceptions:
* in some cases (depending on the app), on older Intels, the AVX512 code could perform worse due to more heat => lower clocks. Zen 4,5 don't have this issue.
* Zen 1 had some rare issues with FMA, and in certain cases, forcing AVX could resolve the problem.
* Bulldozer - due to their AVX/FMA implementations, using an older SSE3 may result in better performance (btw PG and asteroid apps do that by default)
some apps have an option to force the instruction set via param, for instance:
genefer -x avx
ap -cputype avx
asteroids --optimization 4
However, this approach is mainly useful for testing and benchmarking. In 99% of cases, for optimal performance, you should always use the most efficient instruction set available, and at least the apps I mentioned handle this automatically.
The app has to be tuned for newer instructions by the developer (via instincts or assembly) otherwise, it won’t achieve better performance even if your CPU supports them. Einstein apps include some AVX2 instructions but mainly rely on SSE assembly.
However, this approach is mainly useful for testing and benchmarking. In 99% of cases, for optimal performance, you should always use the most efficient instruction set available, and at least the apps I mentioned handle this automatically.
I'm not sure if this is John's intention, or if this will be the case for Asteroids, but I have seen cases before that some users have wanted to use lesser optimization levels because the app wasnt much slower, but consumed less energy and produced less heat (by a factor greater than the loss in performance)
Tom M schrieb: Risky64
)
1) It will die with an error, but only on CPU, which do not have those extentions. Most new CPU have those.
2) I do not understand your questions. Here are many user without gpu, who would benefit from any new code.
Application code can be
)
Application code can be agnostic for utilizing whatever SIMD instructions the cpu and OS support. An example is the Asteroids@home cpu binary which is called a "universal" binary. All SIMD instructions from SSE to AVX-512 supported.
Something like that app binary needs to be put in place here for the cpu applications.
Keith Myers
)
AND I wish it would be automatic to use it if a users CPU does not support the latest instructions. And with check box on the Projects/Preferences page I wish it would be automatic to use it if a users CPU does not support the latest instructions. The check box would have a short explanation saying that it could take a bit longer than if their CPU had AVX-512. ie if a user has the box checked on the Projects/Preferences page than the app will chose the best version for the cpu not just the latest one that could return errors.
The asteroids app uses the
)
The asteroids app uses the highest level SIMD instruction the cpu supports. Always.
You would have to revert to explicit single level SIMD capable binaries with a very long list of each SIMD instruction level.
OR provide a app_config toggle to exclude AVX-512 instructions for example if a user decides to NOT use the AVX-512 capability of the universal app and only use the next highest level of AVX2 for example.
The asteroids app you can
)
The asteroids app you can pass a command line argument in app_config to select which instruction you want to use if you don’t want it to use the “best” one via its own detection.
_________________________________________________________________________
Ian&Steve C. skrev: The
)
Which command line should I use to get the app to use AVX instead of FMA?
AND I wish it would be
)
The app should only use instruction sets supported by your CPU. It detects your CPU's capabilities, and if you attempt to run, for example, AVX-512 code on a CPU that doesn't support it, the app will crash due to an illegal instruction.
what do you mean? If the app crashes, it could be due to a bug, hardware failure, or overheating.
choosing a worse instruction set isn't something a regular user should do. There are a few exceptions:
* in some cases (depending on the app), on older Intels, the AVX512 code could perform worse due to more heat => lower clocks. Zen 4,5 don't have this issue.
* Zen 1 had some rare issues with FMA, and in certain cases, forcing AVX could resolve the problem.
* Bulldozer - due to their AVX/FMA implementations, using an older SSE3 may result in better performance (btw PG and asteroid apps do that by default)
some apps have an option to force the instruction set via param, for instance:
genefer -x avx
ap -cputype avx
asteroids --optimization 4
```
<app_config>
<app_version>
<app_name>period_search</app_name>
<plan_class>win10</plan_class>
<cmdline>--optimization 4</cmdline>
</app_version>
</app_config>
```
However, this approach is mainly useful for testing and benchmarking. In 99% of cases, for optimal performance, you should always use the most efficient instruction set available, and at least the apps I mentioned handle this automatically.
The app has to be tuned for
)
The app has to be tuned for newer instructions by the developer (via instincts or assembly) otherwise, it won’t achieve better performance even if your CPU supports them. Einstein apps include some AVX2 instructions but mainly rely on SSE assembly.
JohnDK wrote:Which command
)
Optimizations:
1 = NONE
2 = SSE2
3 = SSE3
4 = AVX
5 = FMA
6 = AVX512
_________________________________________________________________________
ahorek's team wrote:However,
)
I'm not sure if this is John's intention, or if this will be the case for Asteroids, but I have seen cases before that some users have wanted to use lesser optimization levels because the app wasnt much slower, but consumed less energy and produced less heat (by a factor greater than the loss in performance)
_________________________________________________________________________