dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.93k stars 4.64k forks source link

MacOS save/restore for AVX-512 state #83983

Open tannergooding opened 1 year ago

tannergooding commented 1 year ago

https://github.com/dotnet/runtime/pull/83784 added initial support for thread suspend/restore of AVX512 state for Linux and did most of the work for MacOS.

However, MacOS ended up being disabled due to additional complexities in how AVX-512 support works on such systems.

We should do some minimal additional investigation to determine if AVX-512 support can in fact be enabled for OSX. The believed most likely scenario is that our hardware exception handler may be observing the fault and surfacing it regardless.

EgorBo commented 1 year ago

Since Apple gave up on x86 architecture, does it make any sense?

tannergooding commented 1 year ago

Its still worth it to do the minimal additional investigation to try and support enablement IMO.

There is quite a bit of existing hardware that has support, including in our own CI lab. They likewise still support x64 emulation and while they aren't actively producing new x64 machines today, we can't really say they won't have other support in the future.

That being said, I don't want to spend significant additional time on this. I really just want to complete the investigation based on the suspected blocking issue as if it is just that, then the rest of the logic to support AVX-512 on OSX already exists. If that doesn't resolve the issue, then this issue can be closed with a note that adding the support is low-priority and with a breakdown of where things are today.