-
Notifications
You must be signed in to change notification settings - Fork 363
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
return architecture levels for micromamba #2921
Conversation
Co-authored-by: Marcel Bargull <[email protected]>
Is there a way to unit test this? |
We could check preprocessor tokens (like we do in xsimd) to detect the architecture, and check that result of |
Maybe we can at least compare the output of the Mamba logic to the output of the xsimd logic? That's still limited to the runner architecture but it's better than nothing |
On Linux you could use QEMU. E.g., if you were to compile a test program that prints this function's output: [ "$( qemu-x86_64 -cpu Penryn test-get_archspec_x86_64` )" = "x86_64" ]
[ "$( qemu-x86_64 -cpu Nehalem test-get_archspec_x86_64` )" = "x86_64-v2" ]
[ "$( qemu-x86_64 -cpu Haswell test-get_archspec_x86_64` )" = "x86_64-v3" ]
[ "$( qemu-x86_64 -cpu Skylake-Server test-get_archspec_x86_64` )" = "x86_64-v4" ] This would only work if the host CPU supports the features too. I.e., depending on the runner, you may want to guard the test for |
I think adding a better test would not be worth the trouble. If we use |
Indeed, I missed that we don't pass |
* return architecture levels for micromamba * fix formatting * use function multiversioning only on x86 * fix formatting * update test * use __builtin_cpu_supports and check for more features Co-authored-by: Marcel Bargull <[email protected]> --------- Co-authored-by: Marcel Bargull <[email protected]>
* Allow defaults::* spec (#2927) * return architecture levels for micromamba (#2921) * return architecture levels for micromamba * fix formatting * use function multiversioning only on x86 * fix formatting * update test * use __builtin_cpu_supports and check for more features Co-authored-by: Marcel Bargull <[email protected]> --------- Co-authored-by: Marcel Bargull <[email protected]> * Fix channels with slashes regression (#2926) * Fix channels with slashes regression * fix formatting * make the test isolated Co-authored-by: Antoine Prouvost <[email protected]> * Add more tests * Use pytest utilities for negative testing * Add extra test doc --------- Co-authored-by: Antoine Prouvost <[email protected]> * Fix for name change --------- Co-authored-by: Marcel Bargull <[email protected]> Co-authored-by: Antoine Prouvost <[email protected]>
cc @beckermr, @h-vetinari, @jaimergp, @wolfv