Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
runtime: using AVX-512 instruction without supporting CPUID flag(s) on MacOS hangs the Go runtime #42649
What version of Go are you using (
I get the same behavior from C.
This program also hangs. Compile with
Nothing obvious when run under a debugger. The debugger runs it forever, and every time I interrupt it it is at the
The Darwin kernel has a semi-spooky 2-tier AVX512 process "promotion" mechanism that involves trapping AVX512 instruction faults, changing process status to support AVX512, and then rerunning the offending instruction. In theory this scheme should only happen once per process upon encountering the first AVX512 instruction. The purpose is to avoid the large additional process state required for AVX512 (around 2KB) when it is not needed. I would assume that it would only try this promotion procedure once per process, such that if the AVX512 instruction causing the fault still isn't supported after enabling AVX512 in the process state, that fault should revert to the process. But I'm way out over my skis on this kind of stuff... Here's the Darwin reference: