| От | Nathan Bossart |
|---|---|
| Тема | Re: Popcount optimization using AVX512 |
| Дата | |
| Msg-id | 20240330032209.GA2018686@nathanxps13 обсуждение исходный текст |
| Ответ на | Re: Popcount optimization using AVX512 (Nathan Bossart <nathandbossart@gmail.com>) |
| Ответы |
Re: Popcount optimization using AVX512
|
| Список | pgsql-hackers |
Here's a v17 of the patch. This one has configure checks for everything (i.e., CPUID, XGETBV, and the AVX512 intrinsics) as well as the relevant runtime checks (i.e., we call CPUID to check for XGETBV and AVX512 POPCNT availability, and we call XGETBV to ensure the ZMM registers are enabled). I restricted the AVX512 configure checks to x86_64 since we know we won't have TRY_POPCNT_FAST on 32-bit, and we rely on pg_popcount_fast() as our fallback implementation in the AVX512 version. Finally, I removed the inline assembly in favor of using the _xgetbv() intrinsic on all systems. It looks like that's available on gcc, clang, and msvc, although it sometimes requires -mxsave, so that's applied to pg_popcount_avx512_choose.o as needed. I doubt this will lead to SIGILLs, but it's admittedly a little shaky. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера