NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/58539: AVX-512 support incomplete/broken



If you boot a kernel from the tip of netbsd-9, netbsd-10, netbsd-11,
or HEAD on an affected machine:

1. Is this still reproducible, when you re-enable the upstream AVX512
   logic?

2. Can you share the output of `cpuctl identify 0'?

3. Can you try running the attached program and tell me what it prints?

	$ make avx512ftest DBG=-g\ -O2\ -Wall\ -Werror\ -mavx512f
	$ ./avx512ftest

I don't seem to have machines with AVX512 handy, and qemu doesn't seem
to emulate it.
#include <immintrin.h>
#include <stdio.h>

int
main(void)
{
	volatile int z = 0x5a5a5a5a;
	__m512i x = _mm512_set1_epi32(z);
	__m512i y = _mm512_set_epi32(z + 0, z + 1, z + 2, z + 3,
	    z + 4, z + 5, z + 6, z + 7,
	    z + 8, z + 9, z + 10, z + 11,
	    z + 12, z + 13, z + 14, z + 15);
	__m512i xy = x ^ y;
	char buf[64];
	unsigned i;

	_mm512_store_epi64(buf, xy);
	for (i = 0; i < sizeof(buf); i++)
		printf("%02hhx\n", buf[i]);
	fflush(stdout);
	return ferror(stdout);
}


Home | Main Index | Thread Index | Old Index