Repository navigation
Avx2.IsSupported not reflecting Avx2.Permute4x64 support on MacOS (GitHub Actions build with macos-latest) #43812
Description
Activity
- addeduntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
on Oct 25, 2020 - changed the title
[-]Avx2.IsSupported not reflecting Avx2.Permute4x64 support.[/-][+]Avx2.IsSupported not reflecting Avx2.Permute4x64 support on MacOS (GitHub Actions build with macos-latest)[/+]on Oct 25, 2020 Can you make sure you're really running RC2 on the Mac? You'll often get an old mac without AVX2 support because it's expensive hardware and build labs use it until it dies.
This looks a lot like #42912 that was a mystery issue caused by the "is AVX supported?" check actually checking "is multithreading supported?". It was fixed in RC2.
Reacted by Tanner Gooding(Cc @tannergooding)
This looks a lot like #42912 that was a mystery issue caused by the "is AVX supported?" check actually checking "is multithreading supported?". It was fixed in RC2.
That would be my guess as well.
- added and removeduntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
on Oct 26, 2020 Marked this as a bug until we can get confirmation or a repro showing it is a dupe of #42912
Yes, the logs show rc2. I was dumb and deleted the GitHub Action reports with the failing MacOS records after I removed Avx2 from my code, but you can see the versioning in another build action here
I'm not sure if it was a versioning issue, but I reverted my previous change to remove all Avx2 code and everything builds and passes all tests. I have a test in my project now consisting of
[Test] public void Avx2IsSupportedTest() { Assert.That(Avx2.IsSupported, Is.EqualTo((X86Base.CpuId(7, 0).Ebx & (1 << 5)) != 0)); }
to try to catch the issue if it ever arises again!
I'm not sure if it was a versioning issue, but I reverted my previous change to remove all Avx2 code and everything builds and passes all tests
Thanks for confirming! Looks like this can be closed then.
to try to catch the issue if it ever arises again!
Nit: That test will also fail when someone runs
bcdedit.exe /set xsavedisable 1on Windows and reboots (this disables OS level support for AVX). Checking for this is hard; that's why Avx2.IsSupported really needs to reliably work.Thank you for the heads up @MichalStrehovsky. I'll put a note in the test code in case that test throws in the future. At least I'll know it passes if the test works on my windows machine!
- ghost locked as resolved and limited conversation to collaborators
on Dec 6, 2020
Description
I am working on a double implementation of some matrix structs which use SIMD like the built in float matrix structs. It uses Avx2.Permute4x64 to move some values around in the Vector256 similar to how Matrix4x4 uses Sse.Shuffle in the matrix * matrix operator function. When I build my project on Github Actions with MacOS my tests fail as Avx2.Permute4x64 is not supported when it tries running in the test.
I test if Avx2 is supported or not and I would expect a false return for Avx2.IsSupported if any of the Avx2 intrinsics can fail.
Configuration
I'm building with .net 5.0.100-rc.2.20479.15 with GitHub Actions using
os: [ubuntu-latest, windows-latest, macos-latest]macos-latest is which is throwing.
Regression?
I don't know currently. I will keep trying new .net versions as they come out.
Other information
Output from the build logs:
Since I'm only reasonably competent with just c#. I wouldn't even know where to look back in the compiler or CLR to find the issue. Avx2.cs and Avx2.PlatformNotSupported.cs are not where the actual intrinsics magic happens and I don't know where to look from there.