I wonder how many people have set GOAMD64=v4 in their builds and have not realised their CPU doesn't support AVX512 (since the compiler is not actually emitting AVX512 instructions yet) That's going to be a fun upgrade path for whoever discovers has done that by mistake... [edit, it turns out the outputted binary does actually check for v4 support, so everyone is fine]
cks@mastodon.social
replied 19 Jun 2026 00:24 +0000
in reply to: https://benjojo.co.uk/u/benjojo/h/dx4hKm31nw7l4wk2nC
@benjojo In theory Go programs complain immediately on startup if the current CPU doesn't support the necessary features: This program can only be run on AMD64 processors with v4 microarchitecture support. Whether that covers everything, well, who knows ...
benjojo
replied 19 Jun 2026 09:31 +0000
in reply to: https://mastodon.social/users/cks/statuses/116773924886866825
Nope! On a CPU without AVX512
$ cat test.go
package main
func main(){
return
}
$ GOAMD=v4 go run test.go
$ echo $?
0
benjojo
replied 19 Jun 2026 09:52 +0000
in reply to: https://social.vivaldi.net/users/fazalmajid/statuses/116776152913117892
oh right, derp! ok that makes sense
$ GOAMD64=v4 go run test.go
This program can only be run on AMD64 processors with v4 microarchitecture support.
exit status 1
Thayer@mastodon.soci..
replied 18 Jun 2026 21:27 +0000
in reply to: https://benjojo.co.uk/u/benjojo/h/dx4hKm31nw7l4wk2nC